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

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

Issue 13327002: Merge 190833 "Show user data dialog earlier on Windows." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1453/src/
Patch Set: Created 7 years, 8 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/user_data_dir_extractor.h ('k') | chrome/browser/user_data_dir_extractor_win.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) 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.h" 5 #include "chrome/browser/user_data_dir_extractor.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
11 11
12 namespace chrome { 12 namespace chrome {
13 13
14 base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters) { 14 base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters) {
15 base::FilePath user_data_dir; 15 base::FilePath user_data_dir;
16 16
17 // Getting the user data dir can fail if the directory isn't creatable, for 17 // Getting the user data dir can fail if the directory isn't creatable, for
18 // example: on Windows we bring up a dialog prompting the user to pick a 18 // example: on Windows we bring up a dialog prompting the user to pick a
19 // different directory. However, ProcessSingleton needs a real user_data_dir 19 // different directory. However, ProcessSingleton needs a real user_data_dir
20 // on Mac/Linux, so it's better to fail here than fail mysteriously elsewhere. 20 // on Mac/Linux, so it's better to fail here than fail mysteriously elsewhere.
21 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) 21 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
22 << "Must be able to get user data directory!"; 22 << "Must be able to get user data directory!";
23 return user_data_dir; 23 return user_data_dir;
24 } 24 }
25 25
26 } // namespace chrome 26 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/user_data_dir_extractor.h ('k') | chrome/browser/user_data_dir_extractor_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698