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

Unified Diff: chrome/browser/android/banners/app_banner_settings_helper.cc

Issue 542253003: Add a global on/off switch for content settings and expose a toggle on the Website Settings options… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@global-settings
Patch Set: Rebase. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/banners/app_banner_settings_helper.cc
diff --git a/chrome/browser/android/banners/app_banner_settings_helper.cc b/chrome/browser/android/banners/app_banner_settings_helper.cc
index 7940ad3fa50a3598f0d6ff46f5bdbc6c5d8e68f1..f62aee9bb2380051a71c00888bf06c44972c51c8 100644
--- a/chrome/browser/android/banners/app_banner_settings_helper.cc
+++ b/chrome/browser/android/banners/app_banner_settings_helper.cc
@@ -40,12 +40,12 @@ bool AppBannerSettingsHelper::IsAllowed(content::WebContents* web_contents,
HostContentSettingsMap* settings = profile->GetHostContentSettingsMap();
if (!settings)
return false;
- scoped_ptr<base::Value> value(
+ scoped_ptr<base::Value> value =
settings->GetWebsiteSetting(origin_url,
origin_url,
CONTENT_SETTINGS_TYPE_APP_BANNER,
std::string(),
- NULL));
+ NULL);
if (!value.get()) {
// We've never blocked a banner on this site.
return true;
@@ -89,12 +89,12 @@ void AppBannerSettingsHelper::Block(content::WebContents* web_contents,
if (!settings || !pattern.IsValid())
return;
- scoped_ptr<base::Value> value(
+ scoped_ptr<base::Value> value =
settings->GetWebsiteSetting(origin_url,
origin_url,
CONTENT_SETTINGS_TYPE_APP_BANNER,
std::string(),
- NULL));
+ NULL);
base::DictionaryValue* banner_dict = NULL;
if (value.get() && value->IsType(base::Value::TYPE_DICTIONARY)) {
banner_dict = static_cast<base::DictionaryValue*>(value.release());
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698