OLD | NEW |
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 // 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 <stdint.h> | 13 #include <stdint.h> |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 #include <string> | 16 #include <string> |
17 | 17 |
18 #include "base/debug/stack_trace.h" | 18 #include "base/debug/stack_trace.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/threading/non_thread_safe.h" | 21 #include "base/sequence_checker.h" |
22 #include "base/timer/timer.h" | 22 #include "base/timer/timer.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
25 #include "chrome/browser/lifetime/keep_alive_state_observer.h" | 25 #include "chrome/browser/lifetime/keep_alive_state_observer.h" |
26 #include "chrome/common/features.h" | 26 #include "chrome/common/features.h" |
27 #include "components/prefs/pref_change_registrar.h" | 27 #include "components/prefs/pref_change_registrar.h" |
28 #include "extensions/features/features.h" | 28 #include "extensions/features/features.h" |
29 #include "media/media_features.h" | 29 #include "media/media_features.h" |
30 #include "ppapi/features/features.h" | 30 #include "ppapi/features/features.h" |
31 #include "printing/features/features.h" | 31 #include "printing/features/features.h" |
(...skipping 26 matching lines...) Expand all Loading... |
58 class ChromeNetLog; | 58 class ChromeNetLog; |
59 } | 59 } |
60 | 60 |
61 namespace policy { | 61 namespace policy { |
62 class BrowserPolicyConnector; | 62 class BrowserPolicyConnector; |
63 class PolicyService; | 63 class PolicyService; |
64 }; | 64 }; |
65 | 65 |
66 // Real implementation of BrowserProcess that creates and returns the services. | 66 // Real implementation of BrowserProcess that creates and returns the services. |
67 class BrowserProcessImpl : public BrowserProcess, | 67 class BrowserProcessImpl : public BrowserProcess, |
68 public base::NonThreadSafe, | |
69 public KeepAliveStateObserver { | 68 public KeepAliveStateObserver { |
70 public: | 69 public: |
71 // |local_state_task_runner| must be a shutdown-blocking task runner. | 70 // |local_state_task_runner| must be a shutdown-blocking task runner. |
72 BrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner, | 71 BrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner, |
73 const base::CommandLine& command_line); | 72 const base::CommandLine& command_line); |
74 ~BrowserProcessImpl() override; | 73 ~BrowserProcessImpl() override; |
75 | 74 |
76 // Called before the browser threads are created. | 75 // Called before the browser threads are created. |
77 void PreCreateThreads(); | 76 void PreCreateThreads(); |
78 | 77 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // Any change to this #ifdef must be reflected as well in | 346 // Any change to this #ifdef must be reflected as well in |
348 // chrome/browser/memory/tab_manager_browsertest.cc | 347 // chrome/browser/memory/tab_manager_browsertest.cc |
349 std::unique_ptr<memory::TabManager> tab_manager_; | 348 std::unique_ptr<memory::TabManager> tab_manager_; |
350 #endif | 349 #endif |
351 | 350 |
352 shell_integration::DefaultWebClientState cached_default_web_client_state_; | 351 shell_integration::DefaultWebClientState cached_default_web_client_state_; |
353 | 352 |
354 std::unique_ptr<physical_web::PhysicalWebDataSource> | 353 std::unique_ptr<physical_web::PhysicalWebDataSource> |
355 physical_web_data_source_; | 354 physical_web_data_source_; |
356 | 355 |
| 356 SEQUENCE_CHECKER(sequence_checker_); |
| 357 |
357 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 358 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
358 }; | 359 }; |
359 | 360 |
360 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 361 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |