The user data directory contains profile data such as history, bookmarks, and cookies, as well as other per-installation local state.
Each profile is a subdirectory (often Default ) within the user data directory.
To determine the user data directory for a running Chrome instance:
The default location of the user data directory is computed by chrome::GetDefaultUserDataDirectory .
Generally it varies by
The default location is in the local app data folder:
(The canary channel suffix is determined using InstallConstants::install_suffix .)
The default location is in the Application Support folder:
(The canary channel suffix is determined using the CrProductDirName key in the browser app's Info.plist .)
The default location is in ~/.config :
(The beta and dev channel suffixes are determined from $CHROME_VERSION_EXTRA , which is passed by the launch wrapper script.)
The ~/.config portion of the default location can be overridden by $CHROME_CONFIG_HOME (since M61) or by $XDG_CONFIG_HOME .
Note that $XDG_CONFIG_HOME affects all applications conforming to the XDG Base Directory Spec, while $CHROME_CONFIG_HOME is specific to Chrome and Chromium.
The default location is: /home/chronos
The default location comes from Context.getDir and is specific to the app.
The default location is inside the application support directory in the app sandbox.
On most platforms, the user data directory can be overridden by passing the --user-data-dir command-line flag to the Chrome binary.
The override happens in chrome/app/chrome_main_delegate.cc . Platforms not building with the file may not have implemented the override. Overriding the user data directory via the command line is not supported on iOS.
On Linux, the user data directory can also be overridden with the $CHROME_USER_DATA_DIR environment variable.
The --user-data-dir flag takes precedence if both are present.
Chrome Remote Desktop (CRD) used to set $CHROME_USER_DATA_DIR or $CHROME_CONFIG_HOME on the virtual session on a Linux host, since a single Chrome instance cannot show windows on multiple X displays, and two running Chrome instances cannot share the same user data directory. However, with the obsolescence of dbus-x11 , most modern Linux distros have lost the ability to simultaneously run multiple graphical sessions for the same user without running into difficult-to-trace dbus cross talk issues, and Chrome can only be run on a single X display per user in reality. Therefore, CRD no longer sets these environment variables for new installations after CRD host M105.
The CRD host will continue to set these environment variables if either chrome-config/ or chrome-profile/ exists in ~/.config/chrome-remote-desktop/ . If you want to use the local Chrome profile in CRD sessions, quit Chrome and delete these folders from ~/.config/chrome-remote-desktop/ , then reboot the host device.
On Mac OS X, you can create an application that runs Chrome with a custom --user-data-dir :
set chrome to "\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\"" set userdatadir to "\"$HOME/Library/Application Support/Google/Chrome Alt\"" do shell script chrome & " --user-data-dir=" & userdatadir & " > /dev/null 2>&1 &"
If you want, you can give this application the same icon as Chrome:
On Windows and ChromeOS, the user cache dir is the same as the profile dir. (The profile dir is inside the user data dir.)
On Mac OS X and iOS, the user cache dir is derived from the profile dir as follows:
Example (Mac OS X):
On Linux, the user cache dir is derived from the profile dir as follows:
On Android, the user cache directory comes from Context.getCacheDir.