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

Unified Diff: chrome/browser/first_run/first_run.h

Issue 12670013: Out-of-process import on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of https://codereview.chromium.org/15736014/ Created 7 years, 7 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/extensions/extension_system.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run.h
diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h
index 24fa69c2d59d1f8243dcf45ae5a0041a1e128383..91e5cda9aa4e34ec558168348a62ecd525b9768e 100644
--- a/chrome/browser/first_run/first_run.h
+++ b/chrome/browser/first_run/first_run.h
@@ -39,6 +39,13 @@ class PrefRegistrySyncable;
// install work for this user. After that the sentinel file is created.
namespace first_run {
+enum AutoImportState {
+ AUTO_IMPORT_NONE = 0,
+ AUTO_IMPORT_CALLED = 1 << 0,
+ AUTO_IMPORT_PROFILE_IMPORTED = 1 << 1,
+ AUTO_IMPORT_BOOKMARKS_FILE_IMPORTED = 1 << 2,
+};
+
enum FirstRunBubbleMetric {
FIRST_RUN_BUBBLE_SHOWN = 0, // The search engine bubble was shown.
FIRST_RUN_BUBBLE_CHANGE_INVOKED, // The bubble's "Change" was invoked.
@@ -77,6 +84,7 @@ struct MasterPrefs {
bool suppress_first_run_default_browser_prompt;
std::vector<GURL> new_tabs;
std::vector<GURL> bookmarks;
+ std::string import_bookmarks_path;
std::string variations_seed;
std::string suppress_default_browser_prompt_for_version;
};
@@ -130,35 +138,22 @@ bool ShouldDoPersonalDataManagerFirstRun();
// Log a metric for the "FirstRun.SearchEngineBubble" histogram.
void LogFirstRunMetric(FirstRunBubbleMetric metric);
-// Allow a test to specify additional arguments for the profile import process.
-void SetExtraArgumentsForImportProcess(const CommandLine& arguments);
-
-// Get any extra arguments set with SetExtraArgumentsForImportProcess.
-const CommandLine& GetExtraArgumentsForImportProcess();
-
-// -- Platform-specific functions --
-
// Automatically import history and home page (and search engine, if
-// ShouldShowSearchEngineDialog is true).
+// ShouldShowSearchEngineDialog is true). Also imports bookmarks from file if
+// |import_bookmarks_path| is not empty.
void AutoImport(Profile* profile,
bool homepage_defined,
int import_items,
- int dont_import_items);
+ int dont_import_items,
+ const std::string& import_bookmarks_path);
// Does remaining first run tasks for |profile| and makes Chrome default browser
// if |make_chrome_default|. This can pop the first run consent dialog on linux.
void DoPostImportTasks(Profile* profile, bool make_chrome_default);
-// Whether a first-run import was triggered before the browser mainloop began.
-// This is used in testing to verify import startup actions that occur before
-// an observer can be registered in the test.
-bool DidPerformProfileImport(bool* exited_successfully);
-
-// Imports bookmarks and/or browser items (depending on platform support)
-// in this process. This function is paired with first_run::ImportSettings().
-// This function might or might not show a visible UI depending on the
-// cmdline parameters.
-int ImportNow(Profile* profile, const CommandLine& cmdline);
+// Returns the current state of AutoImport as recorded in a bitfield formed from
+// values in AutoImportState.
+uint16 auto_import_state();
// Set a master preferences file path that overrides platform defaults.
void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs);
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698