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

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

Issue 123693003: Revise user-data-dir switch handling; avoid crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 6 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_USER_DATA_DIR_EXTRACTOR_H_ 5 #ifndef CHROME_BROWSER_USER_DATA_DIR_EXTRACTOR_H_
6 #define CHROME_BROWSER_USER_DATA_DIR_EXTRACTOR_H_ 6 #define CHROME_BROWSER_USER_DATA_DIR_EXTRACTOR_H_
7 7
8 #include "base/callback.h"
9
8 namespace base { 10 namespace base {
9 class FilePath; 11 class FilePath;
10 } 12 }
11 13
12 namespace content{ 14 namespace content{
13 struct MainFunctionParams; 15 struct MainFunctionParams;
14 } 16 }
15 17
16 namespace chrome { 18 namespace chrome {
17 19
20 typedef base::Callback<base::FilePath()> GetUserDataDirCallback;
21
22 // Tests may install a custom GetUserDataDir() callback to override behavior.
23 void InstallCustomGetUserDataDirCallbackForTest(
24 GetUserDataDirCallback* callback);
25
18 // Returns the user data dir. Must be called prior to InitializeLocalState(). 26 // Returns the user data dir. Must be called prior to InitializeLocalState().
19 base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters); 27 base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters);
20 28
21 } // namespace chrome 29 } // namespace chrome
22 30
23 #endif // CHROME_BROWSER_USER_DATA_DIR_EXTRACTOR_H_ 31 #endif // CHROME_BROWSER_USER_DATA_DIR_EXTRACTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698