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 #include "chrome/test/base/testing_browser_process.h" | 5 #include "chrome/test/base/testing_browser_process.h" |
6 | 6 |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/time/default_clock.h" | 8 #include "base/time/default_clock.h" |
9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 unsigned int TestingBrowserProcess::AddRefModule() { | 255 unsigned int TestingBrowserProcess::AddRefModule() { |
256 return ++module_ref_count_; | 256 return ++module_ref_count_; |
257 } | 257 } |
258 | 258 |
259 unsigned int TestingBrowserProcess::ReleaseModule() { | 259 unsigned int TestingBrowserProcess::ReleaseModule() { |
260 DCHECK_GT(module_ref_count_, 0U); | 260 DCHECK_GT(module_ref_count_, 0U); |
261 return --module_ref_count_; | 261 return --module_ref_count_; |
262 } | 262 } |
263 | 263 |
| 264 int TestingBrowserProcess::GetModuleRefCount() const { |
| 265 return static_cast<int>(module_ref_count_); |
| 266 } |
| 267 |
264 bool TestingBrowserProcess::IsShuttingDown() { | 268 bool TestingBrowserProcess::IsShuttingDown() { |
265 return false; | 269 return false; |
266 } | 270 } |
267 | 271 |
268 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { | 272 printing::PrintJobManager* TestingBrowserProcess::print_job_manager() { |
269 #if defined(ENABLE_PRINTING) | 273 #if defined(ENABLE_PRINTING) |
270 if (!print_job_manager_.get()) | 274 if (!print_job_manager_.get()) |
271 print_job_manager_.reset(new printing::PrintJobManager()); | 275 print_job_manager_.reset(new printing::PrintJobManager()); |
272 return print_job_manager_.get(); | 276 return print_job_manager_.get(); |
273 #else | 277 #else |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 449 |
446 /////////////////////////////////////////////////////////////////////////////// | 450 /////////////////////////////////////////////////////////////////////////////// |
447 | 451 |
448 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { | 452 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { |
449 TestingBrowserProcess::CreateInstance(); | 453 TestingBrowserProcess::CreateInstance(); |
450 } | 454 } |
451 | 455 |
452 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { | 456 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { |
453 TestingBrowserProcess::DeleteInstance(); | 457 TestingBrowserProcess::DeleteInstance(); |
454 } | 458 } |
OLD | NEW |