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

Side by Side Diff: chrome/browser/first_run/first_run.h

Issue 11636031: [Fixit Dec-2012] Refactor first_run, very few things should depend on whether the First Run senti... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android and chromeos compile Created 8 years 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 | Annotate | Revision Log
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 // install work for this user. After that the sentinel file is created. 34 // install work for this user. After that the sentinel file is created.
35 namespace first_run { 35 namespace first_run {
36 36
37 enum FirstRunBubbleMetric { 37 enum FirstRunBubbleMetric {
38 FIRST_RUN_BUBBLE_SHOWN = 0, // The search engine bubble was shown. 38 FIRST_RUN_BUBBLE_SHOWN = 0, // The search engine bubble was shown.
39 FIRST_RUN_BUBBLE_CHANGE_INVOKED, // The bubble's "Change" was invoked. 39 FIRST_RUN_BUBBLE_CHANGE_INVOKED, // The bubble's "Change" was invoked.
40 NUM_FIRST_RUN_BUBBLE_METRICS 40 NUM_FIRST_RUN_BUBBLE_METRICS
41 }; 41 };
42 42
43 enum ProcessMasterPreferencesResult { 43 enum ProcessMasterPreferencesResult {
44 SHOW_FIRST_RUN = 0, // Should show the first run flow. 44 DO_FIRST_RUN_TASKS = 0, // Should do the first run tasks.
45 SKIP_FIRST_RUN, // Should skip the first run flow. 45 SKIP_FIRST_RUN_TASKS, // Should skip the first run tasks.
46 EULA_EXIT_NOW, // Should immediately exit due to EULA flow. 46 EULA_EXIT_NOW, // Should immediately exit due to EULA flow.
47 }; 47 };
48 48
49 // See ProcessMasterPreferences for more info about this structure. 49 // See ProcessMasterPreferences for more info about this structure.
50 struct MasterPrefs { 50 struct MasterPrefs {
51 MasterPrefs(); 51 MasterPrefs();
52 ~MasterPrefs(); 52 ~MasterPrefs();
53 53
54 int ping_delay; 54 int ping_delay;
55 bool homepage_defined; 55 bool homepage_defined;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Automatically import history and home page (and search engine, if 102 // Automatically import history and home page (and search engine, if
103 // ShouldShowSearchEngineDialog is true). 103 // ShouldShowSearchEngineDialog is true).
104 void AutoImport(Profile* profile, 104 void AutoImport(Profile* profile,
105 bool homepage_defined, 105 bool homepage_defined,
106 int import_items, 106 int import_items,
107 int dont_import_items, 107 int dont_import_items,
108 ProcessSingleton* process_singleton); 108 ProcessSingleton* process_singleton);
109 109
110 // Does remaining first run tasks for |profile| and makes Chrome default browser 110 // Does remaining first run tasks for |profile| and makes Chrome default browser
111 // if |make_chrome_default|. 111 // if |make_chrome_default|.
112 void DoFirstRunTasks(Profile* profile, bool make_chrome_default); 112 void DoPostImportTasks(Profile* profile, bool make_chrome_default);
113 113
114 // Imports bookmarks and/or browser items (depending on platform support) 114 // Imports bookmarks and/or browser items (depending on platform support)
115 // in this process. This function is paired with first_run::ImportSettings(). 115 // in this process. This function is paired with first_run::ImportSettings().
116 // This function might or might not show a visible UI depending on the 116 // This function might or might not show a visible UI depending on the
117 // cmdline parameters. 117 // cmdline parameters.
118 int ImportNow(Profile* profile, const CommandLine& cmdline); 118 int ImportNow(Profile* profile, const CommandLine& cmdline);
119 119
120 // Returns the path for the master preferences file. 120 // Returns the path for the master preferences file.
121 FilePath MasterPrefsPath(); 121 FilePath MasterPrefsPath();
122 122
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 const content::NotificationDetails& details) OVERRIDE; 155 const content::NotificationDetails& details) OVERRIDE;
156 156
157 content::NotificationRegistrar registrar_; 157 content::NotificationRegistrar registrar_;
158 158
159 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); 159 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher);
160 }; 160 };
161 161
162 } // namespace first_run 162 } // namespace first_run
163 163
164 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ 164 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698