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

Side by Side Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 1025503002: Use same base class for popup and plugin blocking UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use actual types in for loops instead of auto Created 5 years, 9 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 (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/content_settings/tab_specific_content_settings.h" 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 int render_frame_id, 229 int render_frame_id,
230 const GURL& url, 230 const GURL& url,
231 bool blocked_by_policy) { 231 bool blocked_by_policy) {
232 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 232 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
233 TabSpecificContentSettings* settings = GetForFrame( 233 TabSpecificContentSettings* settings = GetForFrame(
234 render_process_id, render_frame_id); 234 render_process_id, render_frame_id);
235 if (settings) 235 if (settings)
236 settings->OnFileSystemAccessed(url, blocked_by_policy); 236 settings->OnFileSystemAccessed(url, blocked_by_policy);
237 } 237 }
238 238
239 const base::string16 TabSpecificContentSettings::GetBlockedPluginNames() const {
240 return JoinString(blocked_plugin_names_, base::ASCIIToUTF16(", "));
241 }
242
243 bool TabSpecificContentSettings::IsContentBlocked( 239 bool TabSpecificContentSettings::IsContentBlocked(
244 ContentSettingsType content_type) const { 240 ContentSettingsType content_type) const {
245 DCHECK(content_type != CONTENT_SETTINGS_TYPE_GEOLOCATION) 241 DCHECK(content_type != CONTENT_SETTINGS_TYPE_GEOLOCATION)
246 << "Geolocation settings handled by ContentSettingGeolocationImageModel"; 242 << "Geolocation settings handled by ContentSettingGeolocationImageModel";
247 DCHECK(content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) 243 DCHECK(content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS)
248 << "Notifications settings handled by " 244 << "Notifications settings handled by "
249 << "ContentSettingsNotificationsImageModel"; 245 << "ContentSettingsNotificationsImageModel";
250 246
251 if (content_type == CONTENT_SETTINGS_TYPE_IMAGES || 247 if (content_type == CONTENT_SETTINGS_TYPE_IMAGES ||
252 content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || 248 content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT ||
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 792
797 void TabSpecificContentSettings::GeolocationDidNavigate( 793 void TabSpecificContentSettings::GeolocationDidNavigate(
798 const content::LoadCommittedDetails& details) { 794 const content::LoadCommittedDetails& details) {
799 geolocation_usages_state_.DidNavigate(GetCommittedDetails(details)); 795 geolocation_usages_state_.DidNavigate(GetCommittedDetails(details));
800 } 796 }
801 797
802 void TabSpecificContentSettings::MidiDidNavigate( 798 void TabSpecificContentSettings::MidiDidNavigate(
803 const content::LoadCommittedDetails& details) { 799 const content::LoadCommittedDetails& details) {
804 midi_usages_state_.DidNavigate(GetCommittedDetails(details)); 800 midi_usages_state_.DidNavigate(GetCommittedDetails(details));
805 } 801 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698