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

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

Issue 2705113005: Update AutoImport to import nothing by default (in absence of policy and master_prefs). (Closed)
Patch Set: Move kImport pref registration from ui to first_run Created 3 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
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 725dade1401126f7b4018063d956907f6a3c2df3..93f448413d7fc430ab2712236dc1174f51904db4 100644
--- a/chrome/browser/first_run/first_run.h
+++ b/chrome/browser/first_run/first_run.h
@@ -24,6 +24,10 @@ namespace content {
class WebContents;
}
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
// This namespace contains the chrome first-run installation actions needed to
// fully test the custom installer. It also contains the opposite actions to
// execute during uninstall. When the first run UI is ready we won't
@@ -71,12 +75,9 @@ struct MasterPrefs {
// remove items from here which are being stored temporarily only to be later
// dumped into local_state. Also see related TODO in chrome_browser_main.cc.
- bool homepage_defined;
- int do_import_items;
- int dont_import_items;
- bool make_chrome_default_for_user;
- bool suppress_first_run_default_browser_prompt;
- bool welcome_page_on_os_upgrade_enabled;
+ bool make_chrome_default_for_user = false;
+ bool suppress_first_run_default_browser_prompt = false;
+ bool welcome_page_on_os_upgrade_enabled = true;
std::vector<GURL> new_tabs;
std::vector<GURL> bookmarks;
std::string import_bookmarks_path;
@@ -86,6 +87,9 @@ struct MasterPrefs {
std::string suppress_default_browser_prompt_for_version;
};
+void RegisterProfilePrefs(
+ user_prefs::PrefRegistrySyncable* registry);
+
// Returns true if Chrome should behave as if this is the first time Chrome is
// run for this user.
bool IsChromeFirstRun();
@@ -151,13 +155,10 @@ bool ShouldDoPersonalDataManagerFirstRun();
// Log a metric for the "FirstRun.SearchEngineBubble" histogram.
void LogFirstRunMetric(FirstRunBubbleMetric metric);
-// Automatically import history and home page (and search engine, if
-// ShouldShowSearchEngineDialog is true). Also imports bookmarks from file if
+// Automatically imports items requested by |profile|'s configuration (sum of
+// policies and master prefs). 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,
const std::string& import_bookmarks_path);
// Does remaining first run tasks. This can pop the first run consent dialog on

Powered by Google App Engine
This is Rietveld 408576698