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

Side by Side Diff: chrome/browser/user_data_dir_extractor_win.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/browser/upload_list.cc ('k') | chrome/browser/user_style_sheet_watcher.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/user_data_dir_extractor_win.h" 5 #include "chrome/browser/user_data_dir_extractor_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 27 matching lines...) Expand all
38 if (custom_get_user_data_dir_callback) 38 if (custom_get_user_data_dir_callback)
39 return custom_get_user_data_dir_callback->Run(); 39 return custom_get_user_data_dir_callback->Run();
40 40
41 base::FilePath user_data_dir; 41 base::FilePath user_data_dir;
42 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 42 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
43 43
44 // On Windows, if we fail to get the user data dir, bring up a dialog to 44 // On Windows, if we fail to get the user data dir, bring up a dialog to
45 // prompt the user to pick a different directory, and restart chrome with 45 // prompt the user to pick a different directory, and restart chrome with
46 // the new dir. 46 // the new dir.
47 // http://code.google.com/p/chromium/issues/detail?id=11510 47 // http://code.google.com/p/chromium/issues/detail?id=11510
48 if (!file_util::PathExists(user_data_dir)) { 48 if (!base::PathExists(user_data_dir)) {
49 #if defined(USE_AURA) 49 #if defined(USE_AURA)
50 // TODO(beng): 50 // TODO(beng):
51 NOTIMPLEMENTED(); 51 NOTIMPLEMENTED();
52 #else 52 #else
53 // Make sure ResourceBundle is initialized. The user data dialog needs to 53 // Make sure ResourceBundle is initialized. The user data dialog needs to
54 // access string resources. See http://crbug.com/230432 54 // access string resources. See http://crbug.com/230432
55 if (!ResourceBundle::HasSharedInstance()) { 55 if (!ResourceBundle::HasSharedInstance()) {
56 std::string locale = l10n_util::GetApplicationLocale(std::string()); 56 std::string locale = l10n_util::GetApplicationLocale(std::string());
57 DCHECK(!locale.empty()); 57 DCHECK(!locale.empty());
58 if (locale.empty()) 58 if (locale.empty())
(...skipping 14 matching lines...) Expand all
73 new_user_data_dir); 73 new_user_data_dir);
74 base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL); 74 base::LaunchProcess(new_command_line, base::LaunchOptions(), NULL);
75 } 75 }
76 #endif 76 #endif
77 NOTREACHED() << "Failed to get user data directory!"; 77 NOTREACHED() << "Failed to get user data directory!";
78 } 78 }
79 return user_data_dir; 79 return user_data_dir;
80 } 80 }
81 81
82 } // namespace chrome 82 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/upload_list.cc ('k') | chrome/browser/user_style_sheet_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698