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

Side by Side Diff: chrome/browser/chrome_browser_main.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: --first-run => --force-first-run Created 7 years, 11 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 | 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_CHROME_BROWSER_MAIN_H_ 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual int PreCreateThreads() OVERRIDE; 71 virtual int PreCreateThreads() OVERRIDE;
72 virtual void PreMainMessageLoopRun() OVERRIDE; 72 virtual void PreMainMessageLoopRun() OVERRIDE;
73 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; 73 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
74 virtual void PostMainMessageLoopRun() OVERRIDE; 74 virtual void PostMainMessageLoopRun() OVERRIDE;
75 virtual void PostDestroyThreads() OVERRIDE; 75 virtual void PostDestroyThreads() OVERRIDE;
76 76
77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called 77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called
78 // in order from PreMainMessageLoopRun(). See implementation for details. 78 // in order from PreMainMessageLoopRun(). See implementation for details.
79 virtual void PreProfileInit(); 79 virtual void PreProfileInit();
80 virtual void PostProfileInit(); 80 virtual void PostProfileInit();
81 virtual void PreInteractiveFirstRunInit();
82 virtual void PostInteractiveFirstRunInit();
83 virtual void PreBrowserStart(); 81 virtual void PreBrowserStart();
84 virtual void PostBrowserStart(); 82 virtual void PostBrowserStart();
85 83
86 #if !defined(OS_ANDROID) 84 #if !defined(OS_ANDROID)
87 // Runs the PageCycler; called if the switch kVisitURLs is present. 85 // Runs the PageCycler; called if the switch kVisitURLs is present.
88 virtual void RunPageCycler(); 86 virtual void RunPageCycler();
89 #endif 87 #endif
90 88
91 // Override this in subclasses to initialize platform specific field trials. 89 // Override this in subclasses to initialize platform specific field trials.
92 virtual void SetupPlatformFieldTrials(); 90 virtual void SetupPlatformFieldTrials();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 TranslateManager* translate_manager_; 176 TranslateManager* translate_manager_;
179 Profile* profile_; 177 Profile* profile_;
180 bool run_message_loop_; 178 bool run_message_loop_;
181 ProcessSingleton::NotifyResult notify_result_; 179 ProcessSingleton::NotifyResult notify_result_;
182 180
183 // Initialized in SetupMetricsAndFieldTrials. 181 // Initialized in SetupMetricsAndFieldTrials.
184 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; 182 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_;
185 183
186 // Members initialized in PreMainMessageLoopRun, needed in 184 // Members initialized in PreMainMessageLoopRun, needed in
187 // PreMainMessageLoopRunThreadsCreated. 185 // PreMainMessageLoopRunThreadsCreated.
188 bool is_first_run_; 186 // Whether to do first run tasks. This should be prefered to is_first_run
cpu_(ooo_6.6-7.5) 2012/12/27 23:53:05 comment refers to variable or method that does not
gab 2012/12/28 20:17:46 Ah right, I removed it from the header since it wa
189 bool first_run_ui_bypass_; 187 // unless the desire is actually to know whether this is really first run
188 // (i.e. even if --no-first-run is passed).
189 bool do_first_run_tasks_;
190 PrefService* local_state_; 190 PrefService* local_state_;
191 FilePath user_data_dir_; 191 FilePath user_data_dir_;
192 192
193 // Members needed across shutdown methods. 193 // Members needed across shutdown methods.
194 bool restart_last_session_; 194 bool restart_last_session_;
195 195
196 // Tests can set this to true to disable restricting cookie access in the 196 // Tests can set this to true to disable restricting cookie access in the
197 // network stack, as this can only be done once. 197 // network stack, as this can only be done once.
198 static bool disable_enforcing_cookie_policies_for_tests_; 198 static bool disable_enforcing_cookie_policies_for_tests_;
199 199
(...skipping 18 matching lines...) Expand all
218 // Records the time from our process' startup to the present time in 218 // Records the time from our process' startup to the present time in
219 // the Startup.BrowserMessageLoopStartTime UMA histogram. 219 // the Startup.BrowserMessageLoopStartTime UMA histogram.
220 void RecordBrowserStartupTime(); 220 void RecordBrowserStartupTime();
221 221
222 // Records a time value to an UMA histogram in the context of the 222 // Records a time value to an UMA histogram in the context of the
223 // PreReadExperiment field-trial. This also reports to the appropriate 223 // PreReadExperiment field-trial. This also reports to the appropriate
224 // sub-histogram (_PreRead(Enabled|Disabled)). 224 // sub-histogram (_PreRead(Enabled|Disabled)).
225 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); 225 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time);
226 226
227 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 227 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698