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

Side by Side Diff: chrome/browser/android/omnibox/autocomplete_controller_android.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more errors Created 5 years, 4 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 "chrome/browser/android/omnibox/autocomplete_controller_android.h" 5 #include "chrome/browser/android/omnibox/autocomplete_controller_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 Profile* profile, JNIEnv* env, jobject obj) { 288 Profile* profile, JNIEnv* env, jobject obj) {
289 AutocompleteControllerAndroid* bridge = 289 AutocompleteControllerAndroid* bridge =
290 static_cast<AutocompleteControllerAndroid*>( 290 static_cast<AutocompleteControllerAndroid*>(
291 GetInstance()->GetServiceForBrowserContext(profile, true)); 291 GetInstance()->GetServiceForBrowserContext(profile, true));
292 bridge->InitJNI(env, obj); 292 bridge->InitJNI(env, obj);
293 return bridge; 293 return bridge;
294 } 294 }
295 295
296 AutocompleteControllerAndroid::Factory* 296 AutocompleteControllerAndroid::Factory*
297 AutocompleteControllerAndroid::Factory::GetInstance() { 297 AutocompleteControllerAndroid::Factory::GetInstance() {
298 return Singleton<AutocompleteControllerAndroid::Factory>::get(); 298 return base::Singleton<AutocompleteControllerAndroid::Factory>::get();
299 } 299 }
300 300
301 content::BrowserContext* 301 content::BrowserContext*
302 AutocompleteControllerAndroid::Factory::GetBrowserContextToUse( 302 AutocompleteControllerAndroid::Factory::GetBrowserContextToUse(
303 content::BrowserContext* context) const { 303 content::BrowserContext* context) const {
304 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 304 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
305 } 305 }
306 306
307 AutocompleteControllerAndroid::Factory::Factory() 307 AutocompleteControllerAndroid::Factory::Factory()
308 : BrowserContextKeyedServiceFactory( 308 : BrowserContextKeyedServiceFactory(
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 return; 554 return;
555 555
556 // ZeroSuggestPrefetcher deletes itself after it's done prefetching. 556 // ZeroSuggestPrefetcher deletes itself after it's done prefetching.
557 new ZeroSuggestPrefetcher(profile); 557 new ZeroSuggestPrefetcher(profile);
558 } 558 }
559 559
560 // Register native methods 560 // Register native methods
561 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) { 561 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) {
562 return RegisterNativesImpl(env); 562 return RegisterNativesImpl(env);
563 } 563 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698