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

Side by Side Diff: components/devtools_bridge/android/apiary_client_factory.cc

Issue 1142463003: Remove devtools_bridge component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/devtools_bridge/android/apiary_client_factory.h"
6
7 #include "base/android/jni_string.h"
8 #include "google_apis/google_api_keys.h"
9 #include "jni/ApiaryClientFactory_jni.h"
10
11 using base::android::ConvertUTF8ToJavaString;
12
13 namespace devtools_bridge {
14 namespace android {
15
16 // static
17 bool ApiaryClientFactory::RegisterNatives(JNIEnv* env) {
18 return RegisterNativesImpl(env);
19 }
20
21 // static
22 jstring GetAPIKey(JNIEnv* env, jobject jcaller) {
23 return ConvertUTF8ToJavaString(env, google_apis::GetAPIKey()).Release();
24 }
25
26 // static
27 jstring GetOAuthClientId(JNIEnv* env, jobject jcaller) {
28 return ConvertUTF8ToJavaString(
29 env, google_apis::GetOAuth2ClientID(
30 google_apis::OAuth2Client::CLIENT_MAIN)).Release();
31 }
32
33 // static
34 jstring GetOAuthClientSecret(JNIEnv* env, jobject jcaller) {
35 return ConvertUTF8ToJavaString(
36 env, google_apis::GetOAuth2ClientSecret(
37 google_apis::OAuth2Client::CLIENT_MAIN)).Release();
38 }
39
40 } // namespace android
41 } // namespace devtools_bridge
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698