| OLD | NEW |
| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 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 bool homepage_defined; | 78 bool make_chrome_default_for_user = false; |
| 79 int do_import_items; | 79 bool suppress_first_run_default_browser_prompt = false; |
| 80 int dont_import_items; | 80 bool welcome_page_on_os_upgrade_enabled = true; |
| 81 bool make_chrome_default_for_user; | |
| 82 bool suppress_first_run_default_browser_prompt; | |
| 83 bool welcome_page_on_os_upgrade_enabled; | |
| 84 std::vector<GURL> new_tabs; | 81 std::vector<GURL> new_tabs; |
| 85 std::vector<GURL> bookmarks; | 82 std::vector<GURL> bookmarks; |
| 86 std::string import_bookmarks_path; | 83 std::string import_bookmarks_path; |
| 87 std::string compressed_variations_seed; | 84 std::string compressed_variations_seed; |
| 88 std::string variations_seed; | 85 std::string variations_seed; |
| 89 std::string variations_seed_signature; | 86 std::string variations_seed_signature; |
| 90 std::string suppress_default_browser_prompt_for_version; | 87 std::string suppress_default_browser_prompt_for_version; |
| 91 }; | 88 }; |
| 92 | 89 |
| 93 // Returns true if Chrome should behave as if this is the first time Chrome is | 90 // Returns true if Chrome should behave as if this is the first time Chrome is |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // Returns true if the autofill personal data manager first-run action | 148 // Returns true if the autofill personal data manager first-run action |
| 152 // should be taken. | 149 // should be taken. |
| 153 // | 150 // |
| 154 // This will return true only once, the first time it is called after | 151 // This will return true only once, the first time it is called after |
| 155 // SetShouldDoPersonalDataManagerFirstRun() is called. | 152 // SetShouldDoPersonalDataManagerFirstRun() is called. |
| 156 bool ShouldDoPersonalDataManagerFirstRun(); | 153 bool ShouldDoPersonalDataManagerFirstRun(); |
| 157 | 154 |
| 158 // Log a metric for the "FirstRun.SearchEngineBubble" histogram. | 155 // Log a metric for the "FirstRun.SearchEngineBubble" histogram. |
| 159 void LogFirstRunMetric(FirstRunBubbleMetric metric); | 156 void LogFirstRunMetric(FirstRunBubbleMetric metric); |
| 160 | 157 |
| 161 // Automatically import history and home page (and search engine, if | 158 // Automatically imports items requested by |profile|'s configuration (sum of |
| 162 // ShouldShowSearchEngineDialog is true). Also imports bookmarks from file if | 159 // policies and master prefs). Also imports bookmarks from file if |
| 163 // |import_bookmarks_path| is not empty. | 160 // |import_bookmarks_path| is not empty. |
| 164 void AutoImport(Profile* profile, | 161 void AutoImport(Profile* profile, |
| 165 bool homepage_defined, | |
| 166 int import_items, | |
| 167 int dont_import_items, | |
| 168 const std::string& import_bookmarks_path); | 162 const std::string& import_bookmarks_path); |
| 169 | 163 |
| 170 // Does remaining first run tasks. This can pop the first run consent dialog on | 164 // Does remaining first run tasks. This can pop the first run consent dialog on |
| 171 // linux. |make_chrome_default_for_user| is the value of | 165 // linux. |make_chrome_default_for_user| is the value of |
| 172 // kMakeChromeDefaultForUser in master_preferences which contributes to the | 166 // kMakeChromeDefaultForUser in master_preferences which contributes to the |
| 173 // decision of making chrome default browser in post import tasks. | 167 // decision of making chrome default browser in post import tasks. |
| 174 void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user); | 168 void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user); |
| 175 | 169 |
| 176 // Returns the current state of AutoImport as recorded in a bitfield formed from | 170 // Returns the current state of AutoImport as recorded in a bitfield formed from |
| 177 // values in AutoImportState. | 171 // values in AutoImportState. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 193 // | 187 // |
| 194 // See chrome/installer/util/master_preferences.h for a description of | 188 // See chrome/installer/util/master_preferences.h for a description of |
| 195 // 'master_preferences' file. | 189 // 'master_preferences' file. |
| 196 ProcessMasterPreferencesResult ProcessMasterPreferences( | 190 ProcessMasterPreferencesResult ProcessMasterPreferences( |
| 197 const base::FilePath& user_data_dir, | 191 const base::FilePath& user_data_dir, |
| 198 MasterPrefs* out_prefs); | 192 MasterPrefs* out_prefs); |
| 199 | 193 |
| 200 } // namespace first_run | 194 } // namespace first_run |
| 201 | 195 |
| 202 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 196 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |