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

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

Issue 10538065: Remove duplicate call to InitAndroidTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 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 | « base/test/test_support_android.h ('k') | testing/android/generate_native_test.py » ('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/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 void InitPathProvider(int key) { 164 void InitPathProvider(int key) {
165 FilePath path; 165 FilePath path;
166 // If failed to override the key, that means the way has not been registered. 166 // If failed to override the key, that means the way has not been registered.
167 if (GetTestProviderPath(key, &path) && !PathService::Override(key, path)) 167 if (GetTestProviderPath(key, &path) && !PathService::Override(key, path))
168 PathService::RegisterProvider(&GetTestProviderPath, key, key + 1); 168 PathService::RegisterProvider(&GetTestProviderPath, key, key + 1);
169 } 169 }
170 170
171 } // namespace 171 } // namespace
172 172
173 namespace base {
174
173 void InitAndroidTestLogging() { 175 void InitAndroidTestLogging() {
174 logging::InitLogging(NULL, 176 logging::InitLogging(NULL,
175 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 177 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
176 logging::DONT_LOCK_LOG_FILE, 178 logging::DONT_LOCK_LOG_FILE,
177 logging::DELETE_OLD_LOG_FILE, 179 logging::DELETE_OLD_LOG_FILE,
178 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 180 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
179 // To view log output with IDs and timestamps use "adb logcat -v threadtime". 181 // To view log output with IDs and timestamps use "adb logcat -v threadtime".
180 logging::SetLogItems(false, // Process ID 182 logging::SetLogItems(false, // Process ID
181 false, // Thread ID 183 false, // Thread ID
182 false, // Timestamp 184 false, // Timestamp
183 false); // Tick count 185 false); // Tick count
184 } 186 }
185 187
186 void InitAndroidTestPaths() { 188 void InitAndroidTestPaths() {
187 InitPathProvider(base::DIR_MODULE); 189 InitPathProvider(DIR_MODULE);
188 InitPathProvider(base::DIR_CACHE); 190 InitPathProvider(DIR_CACHE);
189 InitPathProvider(base::DIR_ANDROID_APP_DATA); 191 InitPathProvider(DIR_ANDROID_APP_DATA);
190 } 192 }
191 193
192 void InitAndroidTestMessageLoop() { 194 void InitAndroidTestMessageLoop() {
193 MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub); 195 MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIStub);
194 } 196 }
195 197
196 void InitAndroidTest() { 198 void InitAndroidTest() {
197 InitAndroidTestLogging(); 199 InitAndroidTestLogging();
198 InitAndroidTestPaths(); 200 InitAndroidTestPaths();
199 InitAndroidTestMessageLoop(); 201 InitAndroidTestMessageLoop();
200 } 202 }
203 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_support_android.h ('k') | testing/android/generate_native_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698