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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/content_settings/content_setting_bubble_model.h" 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/content_settings/content_settings_utils.h" 9 #include "chrome/browser/content_settings/content_settings_utils.h"
10 #include "chrome/browser/content_settings/cookie_settings.h" 10 #include "chrome/browser/content_settings/cookie_settings.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } else { 345 } else {
346 radio_block_label = l10n_util::GetStringUTF8( 346 radio_block_label = l10n_util::GetStringUTF8(
347 GetIdForContentType(kBlockedBlockIDs, arraysize(kBlockedBlockIDs), 347 GetIdForContentType(kBlockedBlockIDs, arraysize(kBlockedBlockIDs),
348 content_type())); 348 content_type()));
349 } 349 }
350 350
351 radio_group.radio_items.push_back(radio_allow_label); 351 radio_group.radio_items.push_back(radio_allow_label);
352 radio_group.radio_items.push_back(radio_block_label); 352 radio_group.radio_items.push_back(radio_block_label);
353 HostContentSettingsMap* map = profile()->GetHostContentSettingsMap(); 353 HostContentSettingsMap* map = profile()->GetHostContentSettingsMap();
354 CookieSettings* cookie_settings = 354 CookieSettings* cookie_settings =
355 CookieSettings::Factory::GetForProfile(profile()); 355 CookieSettings::Factory::GetForProfile(profile()).get();
356 ContentSetting most_restrictive_setting; 356 ContentSetting most_restrictive_setting;
357 SettingSource most_restrictive_setting_source = SETTING_SOURCE_NONE; 357 SettingSource most_restrictive_setting_source = SETTING_SOURCE_NONE;
358 358
359 if (resources.empty()) { 359 if (resources.empty()) {
360 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) { 360 if (content_type() == CONTENT_SETTINGS_TYPE_COOKIES) {
361 most_restrictive_setting = cookie_settings->GetCookieSetting( 361 most_restrictive_setting = cookie_settings->GetCookieSetting(
362 url, url, true, &most_restrictive_setting_source); 362 url, url, true, &most_restrictive_setting_source);
363 } else { 363 } else {
364 SettingInfo info; 364 SettingInfo info;
365 scoped_ptr<Value> value(map->GetWebsiteSetting( 365 scoped_ptr<Value> value(map->GetWebsiteSetting(
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { 1117 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) {
1118 DCHECK_EQ(web_contents_, 1118 DCHECK_EQ(web_contents_,
1119 content::Source<WebContents>(source).ptr()); 1119 content::Source<WebContents>(source).ptr());
1120 web_contents_ = NULL; 1120 web_contents_ = NULL;
1121 } else { 1121 } else {
1122 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); 1122 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
1123 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); 1123 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr());
1124 profile_ = NULL; 1124 profile_ = NULL;
1125 } 1125 }
1126 } 1126 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/gtk/collected_cookies_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698