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

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

Issue 560024: Reland 37913. Clear local state on exit. (Closed)
Patch Set: Created 10 years, 10 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
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/browser_process_impl.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) 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_
11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ 11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/non_thread_safe.h" 17 #include "base/non_thread_safe.h"
18 #include "base/scoped_ptr.h" 18 #include "base/scoped_ptr.h"
19 #include "chrome/browser/automation/automation_provider_list.h" 19 #include "chrome/browser/automation/automation_provider_list.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/tab_contents/thumbnail_generator.h" 21 #include "chrome/browser/tab_contents/thumbnail_generator.h"
22 #include "ipc/ipc_message.h" 22 #include "ipc/ipc_message.h"
23 23
24 #if defined(OS_WIN) 24 #if defined(OS_WIN)
25 #include "sandbox/src/sandbox.h" 25 #include "sandbox/src/sandbox.h"
26 #endif 26 #endif
27 27
28 class CommandLine; 28 class CommandLine;
29 class FilePath;
29 class NotificationService; 30 class NotificationService;
30 31
31 // Real implementation of BrowserProcess that creates and returns the services. 32 // Real implementation of BrowserProcess that creates and returns the services.
32 class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { 33 class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
33 public: 34 public:
34 explicit BrowserProcessImpl(const CommandLine& command_line); 35 explicit BrowserProcessImpl(const CommandLine& command_line);
35 virtual ~BrowserProcessImpl(); 36 virtual ~BrowserProcessImpl();
36 37
37 virtual void EndSession(); 38 virtual void EndSession();
38 39
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 206
206 virtual bool have_inspector_files() const { 207 virtual bool have_inspector_files() const {
207 return have_inspector_files_; 208 return have_inspector_files_;
208 } 209 }
209 210
210 #if defined(IPC_MESSAGE_LOG_ENABLED) 211 #if defined(IPC_MESSAGE_LOG_ENABLED)
211 virtual void SetIPCLoggingEnabled(bool enable); 212 virtual void SetIPCLoggingEnabled(bool enable);
212 #endif 213 #endif
213 214
214 private: 215 private:
216 void ClearLocalState(const FilePath& profile_path);
217 bool ShouldClearLocalState(FilePath* profile_path);
218
215 void CreateResourceDispatcherHost(); 219 void CreateResourceDispatcherHost();
216 void CreatePrefService(); 220 void CreatePrefService();
217 void CreateMetricsService(); 221 void CreateMetricsService();
218 222
219 void CreateIOThread(); 223 void CreateIOThread();
220 static void CleanupOnIOThread(); 224 static void CleanupOnIOThread();
221 225
222 void CreateFileThread(); 226 void CreateFileThread();
223 void CreateDBThread(); 227 void CreateDBThread();
224 void CreateProcessLauncherThread(); 228 void CreateProcessLauncherThread();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Runs on the file thread and stats the inspector's directory, filling in 317 // Runs on the file thread and stats the inspector's directory, filling in
314 // have_inspector_files_ with the result. 318 // have_inspector_files_ with the result.
315 void DoInspectorFilesCheck(); 319 void DoInspectorFilesCheck();
316 // Our best estimate about the existence of the inspector directory. 320 // Our best estimate about the existence of the inspector directory.
317 bool have_inspector_files_; 321 bool have_inspector_files_;
318 322
319 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); 323 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl);
320 }; 324 };
321 325
322 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ 326 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698