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

Unified Diff: chrome/browser/user_data_dir_extractor.cc

Issue 12662033: Show user data dialog earlier on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromium style warning: inline virtual method with non-empty bodies. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/user_data_dir_extractor.cc
diff --git a/chrome/browser/user_data_dir_extractor.cc b/chrome/browser/user_data_dir_extractor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..45084c3a7b42c3c6e4388d9e31cf383d8accfa9d
--- /dev/null
+++ b/chrome/browser/user_data_dir_extractor.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/user_data_dir_extractor.h"
+
+#include "base/files/file_path.h"
+#include "base/logging.h"
+#include "base/path_service.h"
+#include "chrome/common/chrome_paths.h"
+
+namespace chrome {
+
+base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters) {
+ base::FilePath user_data_dir;
+
+ // Getting the user data dir can fail if the directory isn't creatable, for
+ // example: on Windows we bring up a dialog prompting the user to pick a
+ // different directory. However, ProcessSingleton needs a real user_data_dir
+ // on Mac/Linux, so it's better to fail here than fail mysteriously elsewhere.
+ CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
+ << "Must be able to get user data directory!";
+ return user_data_dir;
+}
+
+} // namespace chrome
« 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