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

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

Issue 8670001: Move chromeos specific code to ChromeBrowserMainPartsChromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 virtual ~ChromeBrowserMainParts(); 49 virtual ~ChromeBrowserMainParts();
50 50
51 // Add additional ChromeBrowserMainExtraParts. 51 // Add additional ChromeBrowserMainExtraParts.
52 virtual void AddParts(ChromeBrowserMainExtraParts* parts); 52 virtual void AddParts(ChromeBrowserMainExtraParts* parts);
53 53
54 protected: 54 protected:
55 explicit ChromeBrowserMainParts( 55 explicit ChromeBrowserMainParts(
56 const content::MainFunctionParams& parameters); 56 const content::MainFunctionParams& parameters);
57 57
58 // content::BrowserMainParts overrides. 58 // content::BrowserMainParts overrides.
59 // These are called in-order by content::BrowserMainLoop.
60 // Each stage calls the same stages in any ChromeBrowserMainExtraParts added
61 // with AddParts() from ChromeContentBrowserClient::CreateBrowserMainParts.
59 virtual void PreEarlyInitialization() OVERRIDE; 62 virtual void PreEarlyInitialization() OVERRIDE;
60 virtual void PostEarlyInitialization() OVERRIDE; 63 virtual void PostEarlyInitialization() OVERRIDE;
61 virtual void ToolkitInitialized() OVERRIDE; 64 virtual void ToolkitInitialized() OVERRIDE;
62 virtual void PreMainMessageLoopStart() OVERRIDE; 65 virtual void PreMainMessageLoopStart() OVERRIDE;
63 virtual void PostMainMessageLoopStart() OVERRIDE; 66 virtual void PostMainMessageLoopStart() OVERRIDE;
64 virtual void PreCreateThreads() OVERRIDE; 67 virtual void PreCreateThreads() OVERRIDE;
65 virtual void PreStartThread(content::BrowserThread::ID identifier) OVERRIDE; 68 virtual void PreStartThread(content::BrowserThread::ID identifier) OVERRIDE;
66 virtual void PostStartThread(content::BrowserThread::ID identifier) OVERRIDE; 69 virtual void PostStartThread(content::BrowserThread::ID identifier) OVERRIDE;
67 virtual void PreMainMessageLoopRun() OVERRIDE; 70 virtual void PreMainMessageLoopRun() OVERRIDE;
68 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; 71 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
69 virtual void PostMainMessageLoopRun() OVERRIDE; 72 virtual void PostMainMessageLoopRun() OVERRIDE;
70 virtual void PreStopThread(content::BrowserThread::ID identifier) OVERRIDE; 73 virtual void PreStopThread(content::BrowserThread::ID identifier) OVERRIDE;
71 virtual void PostStopThread(content::BrowserThread::ID identifier) OVERRIDE; 74 virtual void PostStopThread(content::BrowserThread::ID identifier) OVERRIDE;
72 virtual void PostDestroyThreads() OVERRIDE; 75 virtual void PostDestroyThreads() OVERRIDE;
73 76
77 // Additional stages for ChromeBrowserMainExtraParts. These stages are called
78 // in order from PreMainMessageLoopStart(). See implementation for details.
79 virtual void PreProfileInit();
80 virtual void PostProfileInit();
81 virtual void PreBrowserStart();
82 virtual void PostBrowserStart();
83
74 // Displays a warning message that we can't find any locale data files. 84 // Displays a warning message that we can't find any locale data files.
75 virtual void ShowMissingLocaleMessageBox() = 0; 85 virtual void ShowMissingLocaleMessageBox() = 0;
76 86
77 const content::MainFunctionParams& parameters() const { 87 const content::MainFunctionParams& parameters() const {
78 return parameters_; 88 return parameters_;
79 } 89 }
80 const CommandLine& parsed_command_line() const { 90 const CommandLine& parsed_command_line() const {
81 return parsed_command_line_; 91 return parsed_command_line_;
82 } 92 }
83 93
84 Profile* profile() { return profile_; } 94 Profile* profile() { return profile_; }
95 MetricsService* metrics() { return metrics_; }
85 96
86 private: 97 private:
87 // Methods for |EarlyInitialization()| --------------------------------------- 98 // Methods for |EarlyInitialization()| ---------------------------------------
88 99
89 // A/B test for the maximum number of persistent connections per host. 100 // A/B test for the maximum number of persistent connections per host.
90 void ConnectionFieldTrial(); 101 void ConnectionFieldTrial();
91 102
92 // A/B test for determining a value for unused socket timeout. 103 // A/B test for determining a value for unused socket timeout.
93 void SocketTimeoutFieldTrial(); 104 void SocketTimeoutFieldTrial();
94 105
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Records the time from our process' startup to the present time in 220 // Records the time from our process' startup to the present time in
210 // the UMA histogram |metric_name|. 221 // the UMA histogram |metric_name|.
211 void RecordBrowserStartupTime(); 222 void RecordBrowserStartupTime();
212 223
213 // Records a time value to an UMA histogram in the context of the 224 // Records a time value to an UMA histogram in the context of the
214 // PreReadExperiment field-trial. This also reports to the appropriate 225 // PreReadExperiment field-trial. This also reports to the appropriate
215 // sub-histogram (_PreRead(Enabled|Disabled)). 226 // sub-histogram (_PreRead(Enabled|Disabled)).
216 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); 227 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time);
217 228
218 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 229 #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