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

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

Issue 2893943004: Refactor UKM interface for mojo-ification (Closed)
Patch Set: Fixed contextualsearch Created 3 years, 7 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
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/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/time/default_clock.h" 9 #include "base/time/default_clock.h"
10 #include "base/time/default_tick_clock.h" 10 #include "base/time/default_tick_clock.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 TestingBrowserProcess::TestingBrowserProcess() 72 TestingBrowserProcess::TestingBrowserProcess()
73 : notification_service_(content::NotificationService::Create()), 73 : notification_service_(content::NotificationService::Create()),
74 app_locale_("en"), 74 app_locale_("en"),
75 is_shutting_down_(false), 75 is_shutting_down_(false),
76 local_state_(nullptr), 76 local_state_(nullptr),
77 io_thread_(nullptr), 77 io_thread_(nullptr),
78 system_request_context_(nullptr), 78 system_request_context_(nullptr),
79 rappor_service_(nullptr), 79 rappor_service_(nullptr),
80 ukm_service_(nullptr), 80 ukm_recorder_(nullptr),
81 platform_part_(new TestingBrowserProcessPlatformPart()) { 81 platform_part_(new TestingBrowserProcessPlatformPart()) {
82 #if BUILDFLAG(ENABLE_EXTENSIONS) 82 #if BUILDFLAG(ENABLE_EXTENSIONS)
83 extensions_browser_client_.reset( 83 extensions_browser_client_.reset(
84 new extensions::ChromeExtensionsBrowserClient); 84 new extensions::ChromeExtensionsBrowserClient);
85 extensions::AppWindowClient::Set(ChromeAppWindowClient::GetInstance()); 85 extensions::AppWindowClient::Set(ChromeAppWindowClient::GetInstance());
86 extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get()); 86 extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());
87 #endif 87 #endif
88 } 88 }
89 89
90 TestingBrowserProcess::~TestingBrowserProcess() { 90 TestingBrowserProcess::~TestingBrowserProcess() {
(...skipping 20 matching lines...) Expand all
111 } 111 }
112 112
113 metrics::MetricsService* TestingBrowserProcess::metrics_service() { 113 metrics::MetricsService* TestingBrowserProcess::metrics_service() {
114 return nullptr; 114 return nullptr;
115 } 115 }
116 116
117 rappor::RapporServiceImpl* TestingBrowserProcess::rappor_service() { 117 rappor::RapporServiceImpl* TestingBrowserProcess::rappor_service() {
118 return rappor_service_; 118 return rappor_service_;
119 } 119 }
120 120
121 ukm::UkmService* TestingBrowserProcess::ukm_service() { 121 ukm::UkmRecorder* TestingBrowserProcess::ukm_recorder() {
122 return ukm_service_; 122 return ukm_recorder_;
123 } 123 }
124 124
125 IOThread* TestingBrowserProcess::io_thread() { 125 IOThread* TestingBrowserProcess::io_thread() {
126 return io_thread_; 126 return io_thread_;
127 } 127 }
128 128
129 WatchDogThread* TestingBrowserProcess::watchdog_thread() { 129 WatchDogThread* TestingBrowserProcess::watchdog_thread() {
130 return nullptr; 130 return nullptr;
131 } 131 }
132 132
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 std::unique_ptr<subresource_filter::ContentRulesetService> 464 std::unique_ptr<subresource_filter::ContentRulesetService>
465 content_ruleset_service) { 465 content_ruleset_service) {
466 subresource_filter_ruleset_service_.swap(content_ruleset_service); 466 subresource_filter_ruleset_service_.swap(content_ruleset_service);
467 } 467 }
468 468
469 void TestingBrowserProcess::SetRapporServiceImpl( 469 void TestingBrowserProcess::SetRapporServiceImpl(
470 rappor::RapporServiceImpl* rappor_service) { 470 rappor::RapporServiceImpl* rappor_service) {
471 rappor_service_ = rappor_service; 471 rappor_service_ = rappor_service;
472 } 472 }
473 473
474 void TestingBrowserProcess::SetUkmService(ukm::UkmService* ukm_service) { 474 void TestingBrowserProcess::SetUkmRecorder(ukm::UkmRecorder* ukm_recorder) {
475 ukm_service_ = ukm_service; 475 ukm_recorder_ = ukm_recorder;
476 } 476 }
477 477
478 void TestingBrowserProcess::SetShuttingDown(bool is_shutting_down) { 478 void TestingBrowserProcess::SetShuttingDown(bool is_shutting_down) {
479 is_shutting_down_ = is_shutting_down; 479 is_shutting_down_ = is_shutting_down;
480 } 480 }
481 481
482 /////////////////////////////////////////////////////////////////////////////// 482 ///////////////////////////////////////////////////////////////////////////////
483 483
484 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { 484 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() {
485 TestingBrowserProcess::CreateInstance(); 485 TestingBrowserProcess::CreateInstance();
486 } 486 }
487 487
488 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { 488 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() {
489 TestingBrowserProcess::DeleteInstance(); 489 TestingBrowserProcess::DeleteInstance();
490 } 490 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | components/autofill/core/browser/autofill_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698