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

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: ToT Created 5 years, 3 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return; 559 return;
560 560
561 // ZeroSuggestPrefetcher deletes itself after it's done prefetching. 561 // ZeroSuggestPrefetcher deletes itself after it's done prefetching.
562 new ZeroSuggestPrefetcher(profile); 562 new ZeroSuggestPrefetcher(profile);
563 } 563 }
564 564
565 // Register native methods 565 // Register native methods
566 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) { 566 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) {
567 return RegisterNativesImpl(env); 567 return RegisterNativesImpl(env);
568 } 568 }
OLDNEW
« no previous file with comments | « chrome/browser/android/omnibox/autocomplete_controller_android.h ('k') | chrome/browser/apps/app_shim/app_shim_handler_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698