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

Side by Side Diff: chrome/common/chrome_paths.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_paths_internal.h » ('j') | 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.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 FilePath cur; 142 FilePath cur;
143 switch (key) { 143 switch (key) {
144 case chrome::DIR_USER_DATA: 144 case chrome::DIR_USER_DATA:
145 if (!GetDefaultUserDataDirectory(&cur)) { 145 if (!GetDefaultUserDataDirectory(&cur)) {
146 NOTREACHED(); 146 NOTREACHED();
147 return false; 147 return false;
148 } 148 }
149 create_dir = true; 149 create_dir = true;
150 break; 150 break;
151 #if defined(OS_WIN)
152 case chrome::DIR_ALT_USER_DATA:
153 if (!GetAlternateUserDataDirectory(&cur)) {
154 NOTREACHED();
155 return false;
156 }
157 create_dir = false;
158 break;
159 #endif // OS_WIN
151 case chrome::DIR_USER_DOCUMENTS: 160 case chrome::DIR_USER_DOCUMENTS:
152 if (!GetUserDocumentsDirectory(&cur)) 161 if (!GetUserDocumentsDirectory(&cur))
153 return false; 162 return false;
154 create_dir = true; 163 create_dir = true;
155 break; 164 break;
156 case chrome::DIR_USER_PICTURES: 165 case chrome::DIR_USER_PICTURES:
157 if (!GetUserPicturesDirectory(&cur)) 166 if (!GetUserPicturesDirectory(&cur))
158 return false; 167 return false;
159 break; 168 break;
160 case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: 169 case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 return true; 437 return true;
429 } 438 }
430 439
431 // This cannot be done as a static initializer sadly since Visual Studio will 440 // This cannot be done as a static initializer sadly since Visual Studio will
432 // eliminate this object file if there is no direct entry point into it. 441 // eliminate this object file if there is no direct entry point into it.
433 void RegisterPathProvider() { 442 void RegisterPathProvider() {
434 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 443 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
435 } 444 }
436 445
437 } // namespace chrome 446 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_paths_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698