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

Side by Side 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: Created 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_FIRST_RUN_FIRST_RUN_H_ 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_
6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // See ProcessMasterPreferences for more info about this structure. 69 // See ProcessMasterPreferences for more info about this structure.
70 struct MasterPrefs { 70 struct MasterPrefs {
71 MasterPrefs(); 71 MasterPrefs();
72 ~MasterPrefs(); 72 ~MasterPrefs();
73 73
74 // TODO(macourteau): as part of the master preferences refactoring effort, 74 // TODO(macourteau): as part of the master preferences refactoring effort,
75 // remove items from here which are being stored temporarily only to be later 75 // remove items from here which are being stored temporarily only to be later
76 // dumped into local_state. Also see related TODO in chrome_browser_main.cc. 76 // dumped into local_state. Also see related TODO in chrome_browser_main.cc.
77 77
78 int ping_delay; 78 int ping_delay;
79 bool homepage_defined;
80 int do_import_items;
81 int dont_import_items;
82 bool make_chrome_default_for_user; 79 bool make_chrome_default_for_user;
83 bool suppress_first_run_default_browser_prompt; 80 bool suppress_first_run_default_browser_prompt;
84 bool welcome_page_on_os_upgrade_enabled; 81 bool welcome_page_on_os_upgrade_enabled;
85 std::vector<GURL> new_tabs; 82 std::vector<GURL> new_tabs;
86 std::vector<GURL> bookmarks; 83 std::vector<GURL> bookmarks;
87 std::string import_bookmarks_path; 84 std::string import_bookmarks_path;
88 std::string compressed_variations_seed; 85 std::string compressed_variations_seed;
89 std::string variations_seed; 86 std::string variations_seed;
90 std::string variations_seed_signature; 87 std::string variations_seed_signature;
91 std::string suppress_default_browser_prompt_for_version; 88 std::string suppress_default_browser_prompt_for_version;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Returns true if the autofill personal data manager first-run action 152 // Returns true if the autofill personal data manager first-run action
156 // should be taken. 153 // should be taken.
157 // 154 //
158 // This will return true only once, the first time it is called after 155 // This will return true only once, the first time it is called after
159 // SetShouldDoPersonalDataManagerFirstRun() is called. 156 // SetShouldDoPersonalDataManagerFirstRun() is called.
160 bool ShouldDoPersonalDataManagerFirstRun(); 157 bool ShouldDoPersonalDataManagerFirstRun();
161 158
162 // Log a metric for the "FirstRun.SearchEngineBubble" histogram. 159 // Log a metric for the "FirstRun.SearchEngineBubble" histogram.
163 void LogFirstRunMetric(FirstRunBubbleMetric metric); 160 void LogFirstRunMetric(FirstRunBubbleMetric metric);
164 161
165 // Automatically import history and home page (and search engine, if 162 // Automatically imports items requested by |profile|'s configuration (sum of
166 // ShouldShowSearchEngineDialog is true). Also imports bookmarks from file if 163 // policies and master prefs). Also imports bookmarks from file if
167 // |import_bookmarks_path| is not empty. 164 // |import_bookmarks_path| is not empty.
168 void AutoImport(Profile* profile, 165 void AutoImport(Profile* profile,
169 bool homepage_defined,
170 int import_items,
171 int dont_import_items,
172 const std::string& import_bookmarks_path); 166 const std::string& import_bookmarks_path);
173 167
174 // Does remaining first run tasks. This can pop the first run consent dialog on 168 // Does remaining first run tasks. This can pop the first run consent dialog on
175 // linux. |make_chrome_default_for_user| is the value of 169 // linux. |make_chrome_default_for_user| is the value of
176 // kMakeChromeDefaultForUser in master_preferences which contributes to the 170 // kMakeChromeDefaultForUser in master_preferences which contributes to the
177 // decision of making chrome default browser in post import tasks. 171 // decision of making chrome default browser in post import tasks.
178 void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user); 172 void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user);
179 173
180 // Returns the current state of AutoImport as recorded in a bitfield formed from 174 // Returns the current state of AutoImport as recorded in a bitfield formed from
181 // values in AutoImportState. 175 // values in AutoImportState.
(...skipping 15 matching lines...) Expand all
197 // 191 //
198 // See chrome/installer/util/master_preferences.h for a description of 192 // See chrome/installer/util/master_preferences.h for a description of
199 // 'master_preferences' file. 193 // 'master_preferences' file.
200 ProcessMasterPreferencesResult ProcessMasterPreferences( 194 ProcessMasterPreferencesResult ProcessMasterPreferences(
201 const base::FilePath& user_data_dir, 195 const base::FilePath& user_data_dir,
202 MasterPrefs* out_prefs); 196 MasterPrefs* out_prefs);
203 197
204 } // namespace first_run 198 } // namespace first_run
205 199
206 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ 200 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698