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

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

Issue 20483002: Merge 3 different ways of obtaining first run state into a single one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual void ShowMissingLocaleMessageBox() = 0; 94 virtual void ShowMissingLocaleMessageBox() = 0;
95 95
96 const content::MainFunctionParams& parameters() const { 96 const content::MainFunctionParams& parameters() const {
97 return parameters_; 97 return parameters_;
98 } 98 }
99 const CommandLine& parsed_command_line() const { 99 const CommandLine& parsed_command_line() const {
100 return parsed_command_line_; 100 return parsed_command_line_;
101 } 101 }
102 102
103 Profile* profile() { return profile_; } 103 Profile* profile() { return profile_; }
104 bool do_first_run_tasks() const { return do_first_run_tasks_; } 104 bool is_first_run() const { return is_first_run_; }
105 105
106 const PrefService* local_state() const { return local_state_; } 106 const PrefService* local_state() const { return local_state_; }
107 107
108 private: 108 private:
109 // Methods for |SetupMetricsAndFieldTrials()| -------------------------------- 109 // Methods for |SetupMetricsAndFieldTrials()| --------------------------------
110 110
111 // Constructs metrics service and does related initialization, including 111 // Constructs metrics service and does related initialization, including
112 // creation of field trials. Call only after labs have been converted to 112 // creation of field trials. Call only after labs have been converted to
113 // switches. 113 // switches.
114 void SetupMetricsAndFieldTrials(); 114 void SetupMetricsAndFieldTrials();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 Profile* profile_; 188 Profile* profile_;
189 bool run_message_loop_; 189 bool run_message_loop_;
190 ProcessSingleton::NotifyResult notify_result_; 190 ProcessSingleton::NotifyResult notify_result_;
191 scoped_ptr<ThreeDAPIObserver> three_d_observer_; 191 scoped_ptr<ThreeDAPIObserver> three_d_observer_;
192 192
193 // Initialized in SetupMetricsAndFieldTrials. 193 // Initialized in SetupMetricsAndFieldTrials.
194 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; 194 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_;
195 195
196 // Members initialized in PreMainMessageLoopRun, needed in 196 // Members initialized in PreMainMessageLoopRun, needed in
197 // PreMainMessageLoopRunThreadsCreated. 197 // PreMainMessageLoopRunThreadsCreated.
198 bool do_first_run_tasks_; 198 bool is_first_run_;
199 PrefService* local_state_; 199 PrefService* local_state_;
200 base::FilePath user_data_dir_; 200 base::FilePath user_data_dir_;
201 201
202 #if !defined(OS_ANDROID) 202 #if !defined(OS_ANDROID)
203 scoped_ptr<ActiveTabTracker> active_tab_tracker_; 203 scoped_ptr<ActiveTabTracker> active_tab_tracker_;
204 #endif 204 #endif
205 205
206 // Members needed across shutdown methods. 206 // Members needed across shutdown methods.
207 bool restart_last_session_; 207 bool restart_last_session_;
208 208
209 // Tests can set this to true to disable restricting cookie access in the 209 // Tests can set this to true to disable restricting cookie access in the
210 // network stack, as this can only be done once. 210 // network stack, as this can only be done once.
211 static bool disable_enforcing_cookie_policies_for_tests_; 211 static bool disable_enforcing_cookie_policies_for_tests_;
212 212
213 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); 213 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts);
214 }; 214 };
215 215
216 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 216 #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