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

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

Issue 2888473003: [subresource_filter] Site Details UI for default state (Closed)
Patch Set: finnur review Created 3 years, 6 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
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/android/preferences/website_preference_bridge.h" 5 #include "chrome/browser/android/preferences/website_preference_bridge.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 816
817 static void SetDSEGeolocationSetting(JNIEnv* env, 817 static void SetDSEGeolocationSetting(JNIEnv* env,
818 const JavaParamRef<jclass>& clazz, 818 const JavaParamRef<jclass>& clazz,
819 jboolean setting) { 819 jboolean setting) {
820 SearchGeolocationService* search_helper = 820 SearchGeolocationService* search_helper =
821 SearchGeolocationService::Factory::GetForBrowserContext( 821 SearchGeolocationService::Factory::GetForBrowserContext(
822 GetActiveUserProfile(false /* is_incognito */)); 822 GetActiveUserProfile(false /* is_incognito */));
823 return search_helper->SetDSEGeolocationSetting(setting); 823 return search_helper->SetDSEGeolocationSetting(setting);
824 } 824 }
825 825
826 static jboolean GetSubresourceFilterActivated(
827 JNIEnv* env,
828 const JavaParamRef<jclass>& clazz,
829 const JavaParamRef<jstring>& jorigin) {
830 GURL url(ConvertJavaStringToUTF8(env, jorigin));
831 return !!GetHostContentSettingsMap(false)->GetWebsiteSetting(
832 url, GURL(), CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER_DATA, std::string(),
833 nullptr);
834 }
835
826 // Register native methods 836 // Register native methods
827 bool RegisterWebsitePreferenceBridge(JNIEnv* env) { 837 bool RegisterWebsitePreferenceBridge(JNIEnv* env) {
828 return RegisterNativesImpl(env); 838 return RegisterNativesImpl(env);
829 } 839 }
OLDNEW
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698