| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // fully test the custom installer. It also contains the opposite actions to | 26 // fully test the custom installer. It also contains the opposite actions to |
| 27 // execute during uninstall. When the first run UI is ready we won't | 27 // execute during uninstall. When the first run UI is ready we won't |
| 28 // do the actions unconditionally. Currently the only action is to create a | 28 // do the actions unconditionally. Currently the only action is to create a |
| 29 // desktop shortcut. | 29 // desktop shortcut. |
| 30 // | 30 // |
| 31 // The way we detect first-run is by looking at a 'sentinel' file. | 31 // The way we detect first-run is by looking at a 'sentinel' file. |
| 32 // If it does not exist we understand that we need to do the first time | 32 // If it does not exist we understand that we need to do the first time |
| 33 // install work for this user. After that the sentinel file is created. | 33 // install work for this user. After that the sentinel file is created. |
| 34 namespace first_run { | 34 namespace first_run { |
| 35 | 35 |
| 36 enum FirstRunBubbleMetric { |
| 37 FIRST_RUN_BUBBLE_SHOWN = 0, // The search engine bubble was shown. |
| 38 FIRST_RUN_BUBBLE_CHANGE_INVOKED, // The bubble's "Change" was invoked. |
| 39 NUM_FIRST_RUN_BUBBLE_METRICS |
| 40 }; |
| 41 |
| 36 // See ProcessMasterPreferences for more info about this structure. | 42 // See ProcessMasterPreferences for more info about this structure. |
| 37 struct MasterPrefs { | 43 struct MasterPrefs { |
| 38 MasterPrefs(); | 44 MasterPrefs(); |
| 39 ~MasterPrefs(); | 45 ~MasterPrefs(); |
| 40 | 46 |
| 41 int ping_delay; | 47 int ping_delay; |
| 42 bool homepage_defined; | 48 bool homepage_defined; |
| 43 int do_import_items; | 49 int do_import_items; |
| 44 int dont_import_items; | 50 int dont_import_items; |
| 45 bool make_chrome_default; | 51 bool make_chrome_default; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 67 // Sets the kShouldShowWelcomePage local state pref so that the browser | 73 // Sets the kShouldShowWelcomePage local state pref so that the browser |
| 68 // loads the welcome tab once the message loop gets going. Returns false | 74 // loads the welcome tab once the message loop gets going. Returns false |
| 69 // if the pref could not be set. | 75 // if the pref could not be set. |
| 70 bool SetShowWelcomePagePref(); | 76 bool SetShowWelcomePagePref(); |
| 71 | 77 |
| 72 // Sets the kAutofillPersonalDataManagerFirstRun local state pref so that the | 78 // Sets the kAutofillPersonalDataManagerFirstRun local state pref so that the |
| 73 // browser loads PersonalDataManager once the main message loop gets going. | 79 // browser loads PersonalDataManager once the main message loop gets going. |
| 74 // Returns false if the pref could not be set. | 80 // Returns false if the pref could not be set. |
| 75 bool SetPersonalDataManagerFirstRunPref(); | 81 bool SetPersonalDataManagerFirstRunPref(); |
| 76 | 82 |
| 83 // Log a metric for the "FirstRun.SearchEngineBubble" histogram. |
| 84 void LogFirstRunMetric(FirstRunBubbleMetric metric); |
| 85 |
| 77 // -- Platform-specific functions -- | 86 // -- Platform-specific functions -- |
| 78 | 87 |
| 79 // Automatically import history and home page (and search engine, if | 88 // Automatically import history and home page (and search engine, if |
| 80 // ShouldShowSearchEngineDialog is true). | 89 // ShouldShowSearchEngineDialog is true). |
| 81 void AutoImport(Profile* profile, | 90 void AutoImport(Profile* profile, |
| 82 bool homepage_defined, | 91 bool homepage_defined, |
| 83 int import_items, | 92 int import_items, |
| 84 int dont_import_items, | 93 int dont_import_items, |
| 85 bool make_chrome_default, | 94 bool make_chrome_default, |
| 86 ProcessSingleton* process_singleton); | 95 ProcessSingleton* process_singleton); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 const content::NotificationDetails& details) OVERRIDE; | 137 const content::NotificationDetails& details) OVERRIDE; |
| 129 | 138 |
| 130 content::NotificationRegistrar registrar_; | 139 content::NotificationRegistrar registrar_; |
| 131 | 140 |
| 132 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 141 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
| 133 }; | 142 }; |
| 134 | 143 |
| 135 } // namespace first_run | 144 } // namespace first_run |
| 136 | 145 |
| 137 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 146 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |