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_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... | |
22 namespace base { | 22 namespace base { |
23 class CommandLine; | 23 class CommandLine; |
24 class FilePath; | 24 class FilePath; |
25 } | 25 } |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 class WebContents; | 28 class WebContents; |
29 } | 29 } |
30 | 30 |
31 namespace internals { | 31 namespace internals { |
32 GURL GetResetSettingsURL(); | |
32 GURL GetWelcomePageURL(); | 33 GURL GetWelcomePageURL(); |
33 } // namespace internals | 34 } // namespace internals |
34 | 35 |
35 // Assists launching the application and appending the initial tabs for a | 36 // Assists launching the application and appending the initial tabs for a |
36 // browser window. | 37 // browser window. |
37 class StartupBrowserCreatorImpl { | 38 class StartupBrowserCreatorImpl { |
38 public: | 39 public: |
39 // There are two ctors. The first one implies a NULL browser_creator object | 40 // There are two ctors. The first one implies a NULL browser_creator object |
40 // and thus no access to distribution-specific first-run behaviors. The | 41 // and thus no access to distribution-specific first-run behaviors. The |
41 // second one is always called when the browser starts even if it is not | 42 // second one is always called when the browser starts even if it is not |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 void AddUniqueURLs(const std::vector<GURL>& urls, StartupTabs* tabs); | 139 void AddUniqueURLs(const std::vector<GURL>& urls, StartupTabs* tabs); |
139 | 140 |
140 // Adds any startup infobars to the selected tab of the given browser. | 141 // Adds any startup infobars to the selected tab of the given browser. |
141 void AddInfoBarsIfNecessary( | 142 void AddInfoBarsIfNecessary( |
142 Browser* browser, | 143 Browser* browser, |
143 chrome::startup::IsProcessStartup is_process_startup); | 144 chrome::startup::IsProcessStartup is_process_startup); |
144 | 145 |
145 // Adds additional startup URLs to the specified vector. | 146 // Adds additional startup URLs to the specified vector. |
146 void AddStartupURLs(std::vector<GURL>* startup_urls) const; | 147 void AddStartupURLs(std::vector<GURL>* startup_urls) const; |
147 | 148 |
149 // Adds special URLs to the specified vector. These URLs are triggered by | |
150 // special-case logic, such as profile reset or a new wecome page. | |
grt (UTC plus 2)
2015/09/04 18:35:48
it's not clear what "new welcome page" means. how
robertshield
2015/09/04 20:27:18
Done.
| |
151 void AddSpecialURLs(std::vector<GURL>* startup_urls) const; | |
152 | |
148 // Initializes |welcome_run_type_| for this launch. Also persists state to | 153 // Initializes |welcome_run_type_| for this launch. Also persists state to |
149 // suppress injecting the welcome page for future launches. | 154 // suppress injecting the welcome page for future launches. |
150 void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); | 155 void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); |
151 | 156 |
152 // Record Rappor metrics on startup URLs. | 157 // Record Rappor metrics on startup URLs. |
153 void RecordRapporOnStartupURLs(const std::vector<GURL>& urls_to_open); | 158 void RecordRapporOnStartupURLs(const std::vector<GURL>& urls_to_open); |
154 | 159 |
160 bool ProfileHasResetTrigger() const; | |
161 | |
155 const base::FilePath cur_dir_; | 162 const base::FilePath cur_dir_; |
156 const base::CommandLine& command_line_; | 163 const base::CommandLine& command_line_; |
157 Profile* profile_; | 164 Profile* profile_; |
158 StartupBrowserCreator* browser_creator_; | 165 StartupBrowserCreator* browser_creator_; |
159 bool is_first_run_; | 166 bool is_first_run_; |
160 WelcomeRunType welcome_run_type_; | 167 WelcomeRunType welcome_run_type_; |
161 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); | 168 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); |
162 }; | 169 }; |
163 | 170 |
164 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 171 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
OLD | NEW |