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

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

Issue 2035323002: Remove embedder param for SetNotificationSettingForOrigin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java ('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 "base/android/callback_android.h" 7 #include "base/android/callback_android.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 jboolean is_incognito) { 317 jboolean is_incognito) {
318 return DesktopNotificationProfileUtil::GetContentSetting( 318 return DesktopNotificationProfileUtil::GetContentSetting(
319 GetActiveUserProfile(is_incognito), 319 GetActiveUserProfile(is_incognito),
320 GURL(ConvertJavaStringToUTF8(env, origin))); 320 GURL(ConvertJavaStringToUTF8(env, origin)));
321 } 321 }
322 322
323 static void SetNotificationSettingForOrigin( 323 static void SetNotificationSettingForOrigin(
324 JNIEnv* env, 324 JNIEnv* env,
325 const JavaParamRef<jclass>& clazz, 325 const JavaParamRef<jclass>& clazz,
326 const JavaParamRef<jstring>& origin, 326 const JavaParamRef<jstring>& origin,
327 const JavaParamRef<jstring>& embedder,
328 jint value, 327 jint value,
329 jboolean is_incognito) { 328 jboolean is_incognito) {
330 // Note: Web Notification permission behaves differently from all other 329 // Note: Web Notification permission behaves differently from all other
331 // permission types. See https://crbug.com/416894. 330 // permission types. See https://crbug.com/416894.
332 Profile* profile = GetActiveUserProfile(is_incognito); 331 Profile* profile = GetActiveUserProfile(is_incognito);
333 GURL url = GURL(ConvertJavaStringToUTF8(env, origin)); 332 GURL url = GURL(ConvertJavaStringToUTF8(env, origin));
334 ContentSetting setting = static_cast<ContentSetting>(value); 333 ContentSetting setting = static_cast<ContentSetting>(value);
335 switch (setting) { 334 switch (setting) {
336 case CONTENT_SETTING_DEFAULT: 335 case CONTENT_SETTING_DEFAULT:
337 DesktopNotificationProfileUtil::ClearSetting(profile, url); 336 DesktopNotificationProfileUtil::ClearSetting(profile, url);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 GURL url(ConvertJavaStringToUTF8(env, jorigin)); 690 GURL url(ConvertJavaStringToUTF8(env, jorigin));
692 scoped_refptr<SiteDataDeleteHelper> site_data_deleter( 691 scoped_refptr<SiteDataDeleteHelper> site_data_deleter(
693 new SiteDataDeleteHelper(profile, url)); 692 new SiteDataDeleteHelper(profile, url));
694 site_data_deleter->Run(); 693 site_data_deleter->Run();
695 } 694 }
696 695
697 // Register native methods 696 // Register native methods
698 bool RegisterWebsitePreferenceBridge(JNIEnv* env) { 697 bool RegisterWebsitePreferenceBridge(JNIEnv* env) {
699 return RegisterNativesImpl(env); 698 return RegisterNativesImpl(env);
700 } 699 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698