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

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

Issue 2164033002: Refactoring startup logic for upcoming FRE changes (non-Win 10). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing getters to adders Created 4 years, 3 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/first_run/first_run_internal.h"
grt (UTC plus 2) 2016/09/12 07:28:46 move back to the .cc file
14 15
15 class GURL; 16 class GURL;
16 class Profile; 17 class Profile;
17 18
18 namespace base { 19 namespace base {
19 class CommandLine; 20 class CommandLine;
20 class FilePath; 21 class FilePath;
21 } 22 }
22 23
23 namespace user_prefs { 24 namespace user_prefs {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool welcome_page_on_os_upgrade_enabled; 81 bool welcome_page_on_os_upgrade_enabled;
81 std::vector<GURL> new_tabs; 82 std::vector<GURL> new_tabs;
82 std::vector<GURL> bookmarks; 83 std::vector<GURL> bookmarks;
83 std::string import_bookmarks_path; 84 std::string import_bookmarks_path;
84 std::string compressed_variations_seed; 85 std::string compressed_variations_seed;
85 std::string variations_seed; 86 std::string variations_seed;
86 std::string variations_seed_signature; 87 std::string variations_seed_signature;
87 std::string suppress_default_browser_prompt_for_version; 88 std::string suppress_default_browser_prompt_for_version;
88 }; 89 };
89 90
90 // Returns true if this is the first time chrome is run for this user. 91 // Returns true if Chrome should behave as if this is the first time Chrome is
92 // run for this user.
91 bool IsChromeFirstRun(); 93 bool IsChromeFirstRun();
92 94
93 #if defined(OS_MACOSX) 95 #if defined(OS_MACOSX)
94 // Returns true if |command_line|'s switches explicitly specify that first run 96 // Returns true if |command_line|'s switches explicitly specify that first run
95 // should be suppressed in the current run. 97 // should be suppressed in the current run.
96 bool IsFirstRunSuppressed(const base::CommandLine& command_line); 98 bool IsFirstRunSuppressed(const base::CommandLine& command_line);
97 #endif 99 #endif
98 100
99 // Returns whether metrics reporting is currently opt-in. This is used to 101 // Returns whether metrics reporting is currently opt-in. This is used to
100 // determine if the enable metrics reporting checkbox on first-run should be 102 // determine if the enable metrics reporting checkbox on first-run should be
(...skipping 27 matching lines...) Expand all
128 // exactly once, so that the browser loads the welcome tab once the 130 // exactly once, so that the browser loads the welcome tab once the
129 // message loop gets going. 131 // message loop gets going.
130 void SetShouldShowWelcomePage(); 132 void SetShouldShowWelcomePage();
131 133
132 // Returns true if the welcome page should be shown. 134 // Returns true if the welcome page should be shown.
133 // 135 //
134 // This will return true only once: The first time it is called after 136 // This will return true only once: The first time it is called after
135 // SetShouldShowWelcomePage() is called. 137 // SetShouldShowWelcomePage() is called.
136 bool ShouldShowWelcomePage(); 138 bool ShouldShowWelcomePage();
137 139
140 // Iterates over the given tabs, replacing "magic words" designated for
141 // use in Master Preferences files with corresponding URLs.
142 std::vector<GURL> ProcessMasterPrefsTabs(const std::vector<GURL>& tabs);
143
138 // Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun() 144 // Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun()
139 // to return true exactly once, so that the browser loads 145 // to return true exactly once, so that the browser loads
140 // PersonalDataManager once the main message loop gets going. 146 // PersonalDataManager once the main message loop gets going.
141 void SetShouldDoPersonalDataManagerFirstRun(); 147 void SetShouldDoPersonalDataManagerFirstRun();
142 148
143 // Returns true if the autofill personal data manager first-run action 149 // Returns true if the autofill personal data manager first-run action
144 // should be taken. 150 // should be taken.
145 // 151 //
146 // This will return true only once, the first time it is called after 152 // This will return true only once, the first time it is called after
147 // SetShouldDoPersonalDataManagerFirstRun() is called. 153 // SetShouldDoPersonalDataManagerFirstRun() is called.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // 191 //
186 // See chrome/installer/util/master_preferences.h for a description of 192 // See chrome/installer/util/master_preferences.h for a description of
187 // 'master_preferences' file. 193 // 'master_preferences' file.
188 ProcessMasterPreferencesResult ProcessMasterPreferences( 194 ProcessMasterPreferencesResult ProcessMasterPreferences(
189 const base::FilePath& user_data_dir, 195 const base::FilePath& user_data_dir,
190 MasterPrefs* out_prefs); 196 MasterPrefs* out_prefs);
191 197
192 } // namespace first_run 198 } // namespace first_run
193 199
194 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ 200 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.cc » ('j') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698