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

Side by Side Diff: chrome/browser/android/preferences/pref_service_bridge.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/preferences/pref_service_bridge.h" 5 #include "chrome/browser/android/preferences/pref_service_bridge.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "components/version_info/version_info.h" 60 #include "components/version_info/version_info.h"
61 #include "components/web_resource/web_resource_pref_names.h" 61 #include "components/web_resource/web_resource_pref_names.h"
62 #include "content/public/browser/browser_thread.h" 62 #include "content/public/browser/browser_thread.h"
63 #include "jni/PrefServiceBridge_jni.h" 63 #include "jni/PrefServiceBridge_jni.h"
64 #include "ui/base/l10n/l10n_util.h" 64 #include "ui/base/l10n/l10n_util.h"
65 65
66 using base::android::AttachCurrentThread; 66 using base::android::AttachCurrentThread;
67 using base::android::CheckException; 67 using base::android::CheckException;
68 using base::android::ConvertJavaStringToUTF8; 68 using base::android::ConvertJavaStringToUTF8;
69 using base::android::ConvertUTF8ToJavaString; 69 using base::android::ConvertUTF8ToJavaString;
70 using base::android::JavaParamRef;
70 using base::android::ScopedJavaLocalRef; 71 using base::android::ScopedJavaLocalRef;
71 using base::android::ScopedJavaGlobalRef; 72 using base::android::ScopedJavaGlobalRef;
72 using content::BrowserThread; 73 using content::BrowserThread;
73 74
74 namespace { 75 namespace {
75 76
76 const size_t kMaxImportantSites = 5; 77 const size_t kMaxImportantSites = 5;
77 78
78 Profile* GetOriginalProfile() { 79 Profile* GetOriginalProfile() {
79 return ProfileManager::GetActiveUserProfile()->GetOriginalProfile(); 80 return ProfileManager::GetActiveUserProfile()->GetOriginalProfile();
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 1164
1164 return ConvertJavaStringToUTF8(android_permission); 1165 return ConvertJavaStringToUTF8(android_permission);
1165 } 1166 }
1166 1167
1167 static void SetSupervisedUserId(JNIEnv* env, 1168 static void SetSupervisedUserId(JNIEnv* env,
1168 const JavaParamRef<jobject>& obj, 1169 const JavaParamRef<jobject>& obj,
1169 const JavaParamRef<jstring>& pref) { 1170 const JavaParamRef<jstring>& pref) {
1170 GetPrefService()->SetString(prefs::kSupervisedUserId, 1171 GetPrefService()->SetString(prefs::kSupervisedUserId,
1171 ConvertJavaStringToUTF8(env, pref)); 1172 ConvertJavaStringToUTF8(env, pref));
1172 } 1173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698