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

Side by Side Diff: chrome/test/base/testing_browser_process.cc

Issue 301973009: Add browser-global GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Addressed comments. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 NetworkTimeTracker* TestingBrowserProcess::network_time_tracker() { 365 NetworkTimeTracker* TestingBrowserProcess::network_time_tracker() {
366 if (!network_time_tracker_) { 366 if (!network_time_tracker_) {
367 DCHECK(local_state_); 367 DCHECK(local_state_);
368 network_time_tracker_.reset(new NetworkTimeTracker( 368 network_time_tracker_.reset(new NetworkTimeTracker(
369 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), 369 scoped_ptr<base::TickClock>(new base::DefaultTickClock()),
370 local_state_)); 370 local_state_));
371 } 371 }
372 return network_time_tracker_.get(); 372 return network_time_tracker_.get();
373 } 373 }
374 374
375 gcm::GCMDriver* TestingBrowserProcess::gcm_driver() {
376 return NULL;
377 }
378
375 void TestingBrowserProcess::SetSystemRequestContext( 379 void TestingBrowserProcess::SetSystemRequestContext(
376 net::URLRequestContextGetter* context_getter) { 380 net::URLRequestContextGetter* context_getter) {
377 system_request_context_ = context_getter; 381 system_request_context_ = context_getter;
378 } 382 }
379 383
380 void TestingBrowserProcess::SetLocalState(PrefService* local_state) { 384 void TestingBrowserProcess::SetLocalState(PrefService* local_state) {
381 if (!local_state) { 385 if (!local_state) {
382 // The local_state_ PrefService is owned outside of TestingBrowserProcess, 386 // The local_state_ PrefService is owned outside of TestingBrowserProcess,
383 // but some of the members of TestingBrowserProcess hold references to it 387 // but some of the members of TestingBrowserProcess hold references to it
384 // (for example, via PrefNotifier members). But given our test 388 // (for example, via PrefNotifier members). But given our test
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 429
426 /////////////////////////////////////////////////////////////////////////////// 430 ///////////////////////////////////////////////////////////////////////////////
427 431
428 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { 432 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() {
429 TestingBrowserProcess::CreateInstance(); 433 TestingBrowserProcess::CreateInstance();
430 } 434 }
431 435
432 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { 436 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() {
433 TestingBrowserProcess::DeleteInstance(); 437 TestingBrowserProcess::DeleteInstance();
434 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698