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

Side by Side Diff: components/service_tab_launcher/browser/android/service_tab_launcher.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/service_tab_launcher/browser/android/service_tab_launcher.h " 5 #include "components/service_tab_launcher/browser/android/service_tab_launcher.h "
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/page_navigator.h" 10 #include "content/public/browser/page_navigator.h"
(...skipping 12 matching lines...) Expand all
23 const JavaParamRef<jobject>& android_web_contents) { 23 const JavaParamRef<jobject>& android_web_contents) {
24 service_tab_launcher::ServiceTabLauncher::GetInstance()->OnTabLaunched( 24 service_tab_launcher::ServiceTabLauncher::GetInstance()->OnTabLaunched(
25 request_id, 25 request_id,
26 content::WebContents::FromJavaWebContents(android_web_contents)); 26 content::WebContents::FromJavaWebContents(android_web_contents));
27 } 27 }
28 28
29 namespace service_tab_launcher { 29 namespace service_tab_launcher {
30 30
31 // static 31 // static
32 ServiceTabLauncher* ServiceTabLauncher::GetInstance() { 32 ServiceTabLauncher* ServiceTabLauncher::GetInstance() {
33 return Singleton<ServiceTabLauncher>::get(); 33 return base::Singleton<ServiceTabLauncher>::get();
34 } 34 }
35 35
36 ServiceTabLauncher::ServiceTabLauncher() { 36 ServiceTabLauncher::ServiceTabLauncher() {
37 java_object_.Reset( 37 java_object_.Reset(
38 Java_ServiceTabLauncher_getInstance(AttachCurrentThread(), 38 Java_ServiceTabLauncher_getInstance(AttachCurrentThread(),
39 GetApplicationContext())); 39 GetApplicationContext()));
40 } 40 }
41 41
42 ServiceTabLauncher::~ServiceTabLauncher() {} 42 ServiceTabLauncher::~ServiceTabLauncher() {}
43 43
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 callback->Run(web_contents); 95 callback->Run(web_contents);
96 96
97 tab_launched_callbacks_.Remove(request_id); 97 tab_launched_callbacks_.Remove(request_id);
98 } 98 }
99 99
100 bool ServiceTabLauncher::RegisterServiceTabLauncher(JNIEnv* env) { 100 bool ServiceTabLauncher::RegisterServiceTabLauncher(JNIEnv* env) {
101 return RegisterNativesImpl(env); 101 return RegisterNativesImpl(env);
102 } 102 }
103 103
104 } // namespace service_tab_launcher 104 } // namespace service_tab_launcher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698