OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // When each service is created, we set a flag indicating this. At this point, | 5 // When each service is created, we set a flag indicating this. At this point, |
6 // the service initialization could fail or succeed. This allows us to remember | 6 // the service initialization could fail or succeed. This allows us to remember |
7 // if we tried to create a service, and not try creating it over and over if | 7 // if we tried to create a service, and not try creating it over and over if |
8 // the creation failed. | 8 // the creation failed. |
9 | 9 |
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/download/download_status_updater.h" | 22 #include "chrome/browser/download/download_status_updater.h" |
23 #include "chrome/browser/prefs/pref_change_registrar.h" | 23 #include "chrome/browser/prefs/pref_change_registrar.h" |
24 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 24 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
25 #include "ipc/ipc_message.h" | 25 #include "ipc/ipc_message.h" |
26 | 26 |
27 class CommandLine; | 27 class CommandLine; |
28 class DebuggerWrapper; | 28 class DebuggerWrapper; |
29 class FilePath; | 29 class FilePath; |
30 class NotificationService; | 30 class NotificationService; |
| 31 class Profile; |
31 class TabCloseableStateWatcher; | 32 class TabCloseableStateWatcher; |
32 | 33 |
33 // Real implementation of BrowserProcess that creates and returns the services. | 34 // Real implementation of BrowserProcess that creates and returns the services. |
34 class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { | 35 class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { |
35 public: | 36 public: |
36 explicit BrowserProcessImpl(const CommandLine& command_line); | 37 explicit BrowserProcessImpl(const CommandLine& command_line); |
37 virtual ~BrowserProcessImpl(); | 38 virtual ~BrowserProcessImpl(); |
38 | 39 |
39 virtual void EndSession(); | 40 virtual void EndSession(); |
40 | 41 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void StartAutoupdateTimer(); | 77 void StartAutoupdateTimer(); |
77 #endif | 78 #endif |
78 | 79 |
79 virtual bool have_inspector_files() const; | 80 virtual bool have_inspector_files() const; |
80 | 81 |
81 #if defined(IPC_MESSAGE_LOG_ENABLED) | 82 #if defined(IPC_MESSAGE_LOG_ENABLED) |
82 virtual void SetIPCLoggingEnabled(bool enable); | 83 virtual void SetIPCLoggingEnabled(bool enable); |
83 #endif | 84 #endif |
84 | 85 |
85 private: | 86 private: |
| 87 Profile* GetProfile(); |
86 void ClearLocalState(const FilePath& profile_path); | 88 void ClearLocalState(const FilePath& profile_path); |
87 bool ShouldClearLocalState(FilePath* profile_path); | |
88 | 89 |
89 void CreateResourceDispatcherHost(); | 90 void CreateResourceDispatcherHost(); |
90 void CreatePrefService(); | 91 void CreatePrefService(); |
91 void CreateMetricsService(); | 92 void CreateMetricsService(); |
92 | 93 |
93 void CreateIOThread(); | 94 void CreateIOThread(); |
94 static void CleanupOnIOThread(); | 95 static void CleanupOnIOThread(); |
95 | 96 |
96 void CreateFileThread(); | 97 void CreateFileThread(); |
97 void CreateDBThread(); | 98 void CreateDBThread(); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // restarted, and if that's the case, restarts the browser. | 219 // restarted, and if that's the case, restarts the browser. |
219 void OnAutoupdateTimer(); | 220 void OnAutoupdateTimer(); |
220 bool CanAutorestartForUpdate() const; | 221 bool CanAutorestartForUpdate() const; |
221 void RestartPersistentInstance(); | 222 void RestartPersistentInstance(); |
222 #endif // defined(OS_WIN) || defined(OS_LINUX) | 223 #endif // defined(OS_WIN) || defined(OS_LINUX) |
223 | 224 |
224 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 225 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
225 }; | 226 }; |
226 | 227 |
227 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 228 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |