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

Side by Side Diff: chrome/common/chrome_paths_win.cc

Issue 10824321: Remove the metro-only user data dir (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/chrome_paths_internal.h" 5 #include "chrome/common/chrome_paths_internal.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <knownfolders.h> 8 #include <knownfolders.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 11 matching lines...) Expand all
22 22
23 namespace { 23 namespace {
24 24
25 // Gets the default user data directory for either the current environment 25 // Gets the default user data directory for either the current environment
26 // (desktop or metro) or for the other one (metro or desktop). 26 // (desktop or metro) or for the other one (metro or desktop).
27 bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) { 27 bool GetUserDataDirectoryForEnvironment(bool current, FilePath* result) {
28 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result)) 28 if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
29 return false; 29 return false;
30 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 30 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
31 *result = result->Append(dist->GetInstallSubDir()); 31 *result = result->Append(dist->GetInstallSubDir());
32 if (base::win::IsMetroProcess() ? current : !current)
33 *result = result->Append(kMetroChromeUserDataSubDir);
34 *result = result->Append(chrome::kUserDataDirname); 32 *result = result->Append(chrome::kUserDataDirname);
35 return true; 33 return true;
36 } 34 }
37 35
38 } // namespace 36 } // namespace
39 37
40 bool GetDefaultUserDataDirectory(FilePath* result) { 38 bool GetDefaultUserDataDirectory(FilePath* result) {
41 return GetUserDataDirectoryForEnvironment(true, result); 39 return GetUserDataDirectoryForEnvironment(true, result);
42 } 40 }
43 41
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // investigated and fixed if possible. 130 // investigated and fixed if possible.
133 return process_type.empty() || 131 return process_type.empty() ||
134 process_type == switches::kServiceProcess || 132 process_type == switches::kServiceProcess ||
135 process_type == switches::kGpuProcess || 133 process_type == switches::kGpuProcess ||
136 process_type == switches::kNaClBrokerProcess || 134 process_type == switches::kNaClBrokerProcess ||
137 process_type == switches::kNaClLoaderProcess || 135 process_type == switches::kNaClLoaderProcess ||
138 process_type == switches::kPpapiBrokerProcess; 136 process_type == switches::kPpapiBrokerProcess;
139 } 137 }
140 138
141 } // namespace chrome 139 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698