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

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

Issue 8728035: Disarm StartupTimeBomb when it is deleted (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/metrics/field_trial.h" 13 #include "base/metrics/field_trial.h"
14 #include "base/tracked_objects.h" 14 #include "base/tracked_objects.h"
15 #include "chrome/browser/first_run/first_run.h" 15 #include "chrome/browser/first_run/first_run.h"
16 #include "chrome/browser/process_singleton.h" 16 #include "chrome/browser/process_singleton.h"
17 #include "chrome/browser/ui/browser_init.h" 17 #include "chrome/browser/ui/browser_init.h"
18 #include "content/public/browser/browser_main_parts.h" 18 #include "content/public/browser/browser_main_parts.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 20
21 class BrowserInit; 21 class BrowserInit;
22 class BrowserProcessImpl; 22 class BrowserProcessImpl;
23 class ChromeBrowserMainExtraParts; 23 class ChromeBrowserMainExtraParts;
24 class FieldTrialSynchronizer; 24 class FieldTrialSynchronizer;
25 class HistogramSynchronizer; 25 class HistogramSynchronizer;
26 class MetricsService; 26 class MetricsService;
27 class PrefService; 27 class PrefService;
28 class Profile; 28 class Profile;
29 class StartupTimeBomb;
29 class ShutdownWatcherHelper; 30 class ShutdownWatcherHelper;
30 class TranslateManager; 31 class TranslateManager;
31 32
32 namespace chrome_browser { 33 namespace chrome_browser {
33 // For use by ShowMissingLocaleMessageBox. 34 // For use by ShowMissingLocaleMessageBox.
34 extern const char kMissingLocaleDataTitle[]; 35 extern const char kMissingLocaleDataTitle[];
35 extern const char kMissingLocaleDataMessage[]; 36 extern const char kMissingLocaleDataMessage[];
36 } 37 }
37 38
38 namespace chrome_browser_metrics { 39 namespace chrome_browser_metrics {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 132
132 int PreCreateThreadsImpl(); 133 int PreCreateThreadsImpl();
133 int PreMainMessageLoopRunImpl(); 134 int PreMainMessageLoopRunImpl();
134 135
135 // Members initialized on construction --------------------------------------- 136 // Members initialized on construction ---------------------------------------
136 137
137 const content::MainFunctionParams& parameters_; 138 const content::MainFunctionParams& parameters_;
138 const CommandLine& parsed_command_line_; 139 const CommandLine& parsed_command_line_;
139 int result_code_; 140 int result_code_;
140 141
142 // Create StartupTimeBomb object for watching jank during startup.
143 scoped_ptr<StartupTimeBomb> startup_watcher_;
144
141 // Create ShutdownWatcherHelper object for watching jank during shutdown. 145 // Create ShutdownWatcherHelper object for watching jank during shutdown.
142 // Please keep |shutdown_watcher| as the first object constructed, and hence 146 // Please keep |shutdown_watcher| as the first object constructed, and hence
143 // it is destroyed last. 147 // it is destroyed last.
144 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; 148 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_;
145 149
146 // Creating this object starts tracking the creation and deletion of Task 150 // Creating this object starts tracking the creation and deletion of Task
147 // instance. This MUST be done before main_message_loop, so that it is 151 // instance. This MUST be done before main_message_loop, so that it is
148 // destroyed after the main_message_loop. 152 // destroyed after the main_message_loop.
149 tracked_objects::AutoTracking tracking_objects_; 153 tracked_objects::AutoTracking tracking_objects_;
150 154
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Records the time from our process' startup to the present time in 209 // Records the time from our process' startup to the present time in
206 // the UMA histogram |metric_name|. 210 // the UMA histogram |metric_name|.
207 void RecordBrowserStartupTime(); 211 void RecordBrowserStartupTime();
208 212
209 // Records a time value to an UMA histogram in the context of the 213 // Records a time value to an UMA histogram in the context of the
210 // PreReadExperiment field-trial. This also reports to the appropriate 214 // PreReadExperiment field-trial. This also reports to the appropriate
211 // sub-histogram (_PreRead(Enabled|Disabled)). 215 // sub-histogram (_PreRead(Enabled|Disabled)).
212 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); 216 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time);
213 217
214 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 218 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698