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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 TestingBrowserProcess::network_time_tracker() { | 366 TestingBrowserProcess::network_time_tracker() { |
367 if (!network_time_tracker_) { | 367 if (!network_time_tracker_) { |
368 DCHECK(local_state_); | 368 DCHECK(local_state_); |
369 network_time_tracker_.reset(new network_time::NetworkTimeTracker( | 369 network_time_tracker_.reset(new network_time::NetworkTimeTracker( |
370 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), | 370 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), |
371 local_state_)); | 371 local_state_)); |
372 } | 372 } |
373 return network_time_tracker_.get(); | 373 return network_time_tracker_.get(); |
374 } | 374 } |
375 | 375 |
| 376 gcm::GCMDriver* TestingBrowserProcess::gcm_driver() { |
| 377 return NULL; |
| 378 } |
| 379 |
376 void TestingBrowserProcess::SetSystemRequestContext( | 380 void TestingBrowserProcess::SetSystemRequestContext( |
377 net::URLRequestContextGetter* context_getter) { | 381 net::URLRequestContextGetter* context_getter) { |
378 system_request_context_ = context_getter; | 382 system_request_context_ = context_getter; |
379 } | 383 } |
380 | 384 |
381 void TestingBrowserProcess::SetLocalState(PrefService* local_state) { | 385 void TestingBrowserProcess::SetLocalState(PrefService* local_state) { |
382 if (!local_state) { | 386 if (!local_state) { |
383 // The local_state_ PrefService is owned outside of TestingBrowserProcess, | 387 // The local_state_ PrefService is owned outside of TestingBrowserProcess, |
384 // but some of the members of TestingBrowserProcess hold references to it | 388 // but some of the members of TestingBrowserProcess hold references to it |
385 // (for example, via PrefNotifier members). But given our test | 389 // (for example, via PrefNotifier members). But given our test |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 430 |
427 /////////////////////////////////////////////////////////////////////////////// | 431 /////////////////////////////////////////////////////////////////////////////// |
428 | 432 |
429 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { | 433 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { |
430 TestingBrowserProcess::CreateInstance(); | 434 TestingBrowserProcess::CreateInstance(); |
431 } | 435 } |
432 | 436 |
433 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { | 437 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { |
434 TestingBrowserProcess::DeleteInstance(); | 438 TestingBrowserProcess::DeleteInstance(); |
435 } | 439 } |
OLD | NEW |