| 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> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "base/basictypes.h" | 13 #include "build/build_config.h" |
| 12 | 14 |
| 13 class GURL; | 15 class GURL; |
| 14 class Profile; | 16 class Profile; |
| 15 | 17 |
| 16 namespace base { | 18 namespace base { |
| 17 class CommandLine; | 19 class CommandLine; |
| 18 class FilePath; | 20 class FilePath; |
| 19 } | 21 } |
| 20 | 22 |
| 21 namespace user_prefs { | 23 namespace user_prefs { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const std::string& import_bookmarks_path); | 150 const std::string& import_bookmarks_path); |
| 149 | 151 |
| 150 // Does remaining first run tasks. This can pop the first run consent dialog on | 152 // Does remaining first run tasks. This can pop the first run consent dialog on |
| 151 // linux. |make_chrome_default_for_user| is the value of | 153 // linux. |make_chrome_default_for_user| is the value of |
| 152 // kMakeChromeDefaultForUser in master_preferences which contributes to the | 154 // kMakeChromeDefaultForUser in master_preferences which contributes to the |
| 153 // decision of making chrome default browser in post import tasks. | 155 // decision of making chrome default browser in post import tasks. |
| 154 void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user); | 156 void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user); |
| 155 | 157 |
| 156 // Returns the current state of AutoImport as recorded in a bitfield formed from | 158 // Returns the current state of AutoImport as recorded in a bitfield formed from |
| 157 // values in AutoImportState. | 159 // values in AutoImportState. |
| 158 uint16 auto_import_state(); | 160 uint16_t auto_import_state(); |
| 159 | 161 |
| 160 // Set a master preferences file path that overrides platform defaults. | 162 // Set a master preferences file path that overrides platform defaults. |
| 161 void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs); | 163 void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs); |
| 162 | 164 |
| 163 // The master_preferences is a JSON file with the same entries as the | 165 // The master_preferences is a JSON file with the same entries as the |
| 164 // 'Default\Preferences' file. This function locates this file from a standard | 166 // 'Default\Preferences' file. This function locates this file from a standard |
| 165 // location, processes it, and uses its content to initialize the preferences | 167 // location, processes it, and uses its content to initialize the preferences |
| 166 // for the profile pointed to by |user_data_dir|. After processing the file, | 168 // for the profile pointed to by |user_data_dir|. After processing the file, |
| 167 // this function returns a value from the ProcessMasterPreferencesResult enum, | 169 // this function returns a value from the ProcessMasterPreferencesResult enum, |
| 168 // indicating whether the first run flow should be shown, skipped, or whether | 170 // indicating whether the first run flow should be shown, skipped, or whether |
| 169 // the browser should exit. | 171 // the browser should exit. |
| 170 // | 172 // |
| 171 // This function overwrites any existing Preferences file and is only meant to | 173 // This function overwrites any existing Preferences file and is only meant to |
| 172 // be invoked on first run. | 174 // be invoked on first run. |
| 173 // | 175 // |
| 174 // See chrome/installer/util/master_preferences.h for a description of | 176 // See chrome/installer/util/master_preferences.h for a description of |
| 175 // 'master_preferences' file. | 177 // 'master_preferences' file. |
| 176 ProcessMasterPreferencesResult ProcessMasterPreferences( | 178 ProcessMasterPreferencesResult ProcessMasterPreferences( |
| 177 const base::FilePath& user_data_dir, | 179 const base::FilePath& user_data_dir, |
| 178 MasterPrefs* out_prefs); | 180 MasterPrefs* out_prefs); |
| 179 | 181 |
| 180 } // namespace first_run | 182 } // namespace first_run |
| 181 | 183 |
| 182 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 184 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |