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

Side by Side Diff: base/test/test_support_android.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 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
« no previous file with comments | « base/test/test_suite.cc ('k') | base/test/test_support_ios.mm » ('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 <stdarg.h> 5 #include <stdarg.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "base/android/path_utils.h" 8 #include "base/android/path_utils.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 void Quit() override { Waitable::GetInstance()->Quit(); } 121 void Quit() override { Waitable::GetInstance()->Quit(); }
122 122
123 void ScheduleWork() override { Waitable::GetInstance()->Signal(); } 123 void ScheduleWork() override { Waitable::GetInstance()->Signal(); }
124 124
125 void ScheduleDelayedWork(const base::TimeTicks& delayed_work_time) override { 125 void ScheduleDelayedWork(const base::TimeTicks& delayed_work_time) override {
126 Waitable::GetInstance()->Signal(); 126 Waitable::GetInstance()->Signal();
127 } 127 }
128 }; 128 };
129 129
130 scoped_ptr<base::MessagePump> CreateMessagePumpForUIStub() { 130 std::unique_ptr<base::MessagePump> CreateMessagePumpForUIStub() {
131 return scoped_ptr<base::MessagePump>(new MessagePumpForUIStub()); 131 return std::unique_ptr<base::MessagePump>(new MessagePumpForUIStub());
132 }; 132 };
133 133
134 // Provides the test path for DIR_MODULE and DIR_ANDROID_APP_DATA. 134 // Provides the test path for DIR_MODULE and DIR_ANDROID_APP_DATA.
135 bool GetTestProviderPath(int key, base::FilePath* result) { 135 bool GetTestProviderPath(int key, base::FilePath* result) {
136 switch (key) { 136 switch (key) {
137 case base::DIR_ANDROID_APP_DATA: { 137 case base::DIR_ANDROID_APP_DATA: {
138 // For tests, app data is put in external storage. 138 // For tests, app data is put in external storage.
139 return base::android::GetExternalStorageDirectory(result); 139 return base::android::GetExternalStorageDirectory(result);
140 } 140 }
141 default: 141 default:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub)) 174 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub))
175 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override."; 175 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override.";
176 } 176 }
177 177
178 void InitAndroidTest() { 178 void InitAndroidTest() {
179 InitAndroidTestLogging(); 179 InitAndroidTestLogging();
180 InitAndroidTestPaths(); 180 InitAndroidTestPaths();
181 InitAndroidTestMessageLoop(); 181 InitAndroidTestMessageLoop();
182 } 182 }
183 } // namespace base 183 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_suite.cc ('k') | base/test/test_support_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698