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.cc

Issue 2709783002: Add DIR_ROAMING_USER_DATA to PathService. (Closed)
Patch Set: Address comment. Created 3 years, 10 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
« 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/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 break; 234 break;
235 #if defined(OS_WIN) 235 #if defined(OS_WIN)
236 case chrome::DIR_WATCHER_DATA: 236 case chrome::DIR_WATCHER_DATA:
237 // The watcher data is always stored relative to the default user data 237 // The watcher data is always stored relative to the default user data
238 // directory. This allows the watcher to be initialized before 238 // directory. This allows the watcher to be initialized before
239 // command-line options have been parsed. 239 // command-line options have been parsed.
240 if (!GetDefaultUserDataDirectory(&cur)) 240 if (!GetDefaultUserDataDirectory(&cur))
241 return false; 241 return false;
242 cur = cur.Append(FILE_PATH_LITERAL("Diagnostics")); 242 cur = cur.Append(FILE_PATH_LITERAL("Diagnostics"));
243 break; 243 break;
244 case chrome::DIR_ROAMING_USER_DATA:
245 if (!GetDefaultRoamingUserDataDirectory(&cur)) {
246 NOTREACHED();
247 return false;
248 }
249 create_dir = true;
250 break;
244 #endif 251 #endif
245 case chrome::DIR_RESOURCES: 252 case chrome::DIR_RESOURCES:
246 #if defined(OS_MACOSX) 253 #if defined(OS_MACOSX)
247 cur = base::mac::FrameworkBundlePath(); 254 cur = base::mac::FrameworkBundlePath();
248 cur = cur.Append(FILE_PATH_LITERAL("Resources")); 255 cur = cur.Append(FILE_PATH_LITERAL("Resources"));
249 #else 256 #else
250 if (!PathService::Get(chrome::DIR_APP, &cur)) 257 if (!PathService::Get(chrome::DIR_APP, &cur))
251 return false; 258 return false;
252 cur = cur.Append(FILE_PATH_LITERAL("resources")); 259 cur = cur.Append(FILE_PATH_LITERAL("resources"));
253 #endif 260 #endif
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 600
594 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 601 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
595 g_invalid_specified_user_data_dir.Get() = user_data_dir; 602 g_invalid_specified_user_data_dir.Get() = user_data_dir;
596 } 603 }
597 604
598 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 605 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
599 return g_invalid_specified_user_data_dir.Get(); 606 return g_invalid_specified_user_data_dir.Get();
600 } 607 }
601 608
602 } // namespace chrome 609 } // 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