Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: chrome/common/chrome_paths_win.cc

Issue 10539153: Do not show the EULA if it has already been accepted by the user in another user data dir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DIR_ALT_USER_DATA is windows only Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_paths_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths_win.cc
diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc
index dc2502f0b2f88a6463cf443bebb29f1f6311e3fd..21d9a35d11527ac235f688d7ffd7ae0297e6d0a9 100644
--- a/chrome/common/chrome_paths_win.cc
+++ b/chrome/common/chrome_paths_win.cc
@@ -20,17 +20,31 @@
namespace chrome {
-bool GetDefaultUserDataDirectory(FilePath* result) {
+namespace {
+
+// Gets the default user data directory for either the current environment
+// (desktop or metro) or for the other one (metro or desktop).
+bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) {
if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
return false;
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
*result = result->Append(dist->GetInstallSubDir());
- if (base::win::GetMetroModule())
+ if (base::win::GetMetroModule() ? current : !current)
*result = result->Append(kMetroChromeUserDataSubDir);
*result = result->Append(chrome::kUserDataDirname);
return true;
}
+} // namespace
+
+bool GetDefaultUserDataDirectory(FilePath* result) {
+ return GetUserDataDirectoryForEnvironment(true, result);
+}
+
+bool GetAlternateUserDataDirectory(FilePath *result) {
+ return GetUserDataDirectoryForEnvironment(false, result);
+}
+
bool GetChromeFrameUserDataDirectory(FilePath* result) {
if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
return false;
« no previous file with comments | « chrome/common/chrome_paths_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698