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

Side by Side Diff: ios/chrome/test/testing_application_context.mm

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ios/chrome/test/testing_application_context.h" 5 #include "ios/chrome/test/testing_application_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h"
8 #include "base/time/default_clock.h" 9 #include "base/time/default_clock.h"
9 #include "base/time/default_tick_clock.h" 10 #include "base/time/default_tick_clock.h"
10 #include "components/network_time/network_time_tracker.h" 11 #include "components/network_time/network_time_tracker.h"
11 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 12 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
12 13
13 TestingApplicationContext::TestingApplicationContext() 14 TestingApplicationContext::TestingApplicationContext()
14 : application_locale_("en"), 15 : application_locale_("en"),
15 local_state_(nullptr), 16 local_state_(nullptr),
16 chrome_browser_state_manager_(nullptr), 17 chrome_browser_state_manager_(nullptr),
17 was_last_shutdown_clean_(false) { 18 was_last_shutdown_clean_(false) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 DCHECK(thread_checker_.CalledOnValidThread()); 119 DCHECK(thread_checker_.CalledOnValidThread());
119 return nullptr; 120 return nullptr;
120 } 121 }
121 122
122 network_time::NetworkTimeTracker* 123 network_time::NetworkTimeTracker*
123 TestingApplicationContext::GetNetworkTimeTracker() { 124 TestingApplicationContext::GetNetworkTimeTracker() {
124 DCHECK(thread_checker_.CalledOnValidThread()); 125 DCHECK(thread_checker_.CalledOnValidThread());
125 if (!network_time_tracker_) { 126 if (!network_time_tracker_) {
126 DCHECK(local_state_); 127 DCHECK(local_state_);
127 network_time_tracker_.reset(new network_time::NetworkTimeTracker( 128 network_time_tracker_.reset(new network_time::NetworkTimeTracker(
128 make_scoped_ptr(new base::DefaultClock), 129 base::WrapUnique(new base::DefaultClock),
129 make_scoped_ptr(new base::DefaultTickClock), local_state_)); 130 base::WrapUnique(new base::DefaultTickClock), local_state_));
130 } 131 }
131 return network_time_tracker_.get(); 132 return network_time_tracker_.get();
132 } 133 }
133 134
134 IOSChromeIOThread* TestingApplicationContext::GetIOSChromeIOThread() { 135 IOSChromeIOThread* TestingApplicationContext::GetIOSChromeIOThread() {
135 DCHECK(thread_checker_.CalledOnValidThread()); 136 DCHECK(thread_checker_.CalledOnValidThread());
136 return nullptr; 137 return nullptr;
137 } 138 }
138 139
139 gcm::GCMDriver* TestingApplicationContext::GetGCMDriver() { 140 gcm::GCMDriver* TestingApplicationContext::GetGCMDriver() {
(...skipping 10 matching lines...) Expand all
150 component_updater::ComponentUpdateService* 151 component_updater::ComponentUpdateService*
151 TestingApplicationContext::GetComponentUpdateService() { 152 TestingApplicationContext::GetComponentUpdateService() {
152 DCHECK(thread_checker_.CalledOnValidThread()); 153 DCHECK(thread_checker_.CalledOnValidThread());
153 return nullptr; 154 return nullptr;
154 } 155 }
155 156
156 CRLSetFetcher* TestingApplicationContext::GetCRLSetFetcher() { 157 CRLSetFetcher* TestingApplicationContext::GetCRLSetFetcher() {
157 DCHECK(thread_checker_.CalledOnValidThread()); 158 DCHECK(thread_checker_.CalledOnValidThread());
158 return nullptr; 159 return nullptr;
159 } 160 }
OLDNEW
« no previous file with comments | « ios/chrome/test/testing_application_context.h ('k') | ios/chrome/tools/strings/generate_localizable_strings.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698