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

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: Fix build on Android. 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
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | google_apis/BUILD.gn » ('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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | google_apis/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698