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

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

Issue 8539004: Replace SetContentSetting method of the content_settings::Provider interface with GetWebsiteSetting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto origin/trunk Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/content_settings_policy_provider.h" 5 #include "chrome/browser/content_settings/content_settings_policy_provider.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 void PolicyProvider::ReadManagedContentSettings(bool overwrite) { 377 void PolicyProvider::ReadManagedContentSettings(bool overwrite) {
378 base::AutoLock auto_lock(lock_); 378 base::AutoLock auto_lock(lock_);
379 if (overwrite) 379 if (overwrite)
380 value_map_.clear(); 380 value_map_.clear();
381 GetContentSettingsFromPreferences(&value_map_); 381 GetContentSettingsFromPreferences(&value_map_);
382 GetAutoSelectCertificateSettingsFromPreferences(&value_map_); 382 GetAutoSelectCertificateSettingsFromPreferences(&value_map_);
383 } 383 }
384 384
385 // Since the PolicyProvider is a read only content settings provider, all 385 // Since the PolicyProvider is a read only content settings provider, all
386 // methodes of the ProviderInterface that set or delete any settings do nothing. 386 // methodes of the ProviderInterface that set or delete any settings do nothing.
387 void PolicyProvider::SetContentSetting( 387 bool PolicyProvider::SetWebsiteSetting(
388 const ContentSettingsPattern& primary_pattern, 388 const ContentSettingsPattern& primary_pattern,
389 const ContentSettingsPattern& secondary_pattern, 389 const ContentSettingsPattern& secondary_pattern,
390 ContentSettingsType content_type, 390 ContentSettingsType content_type,
391 const ResourceIdentifier& resource_identifier, 391 const ResourceIdentifier& resource_identifier,
392 ContentSetting content_setting) { 392 Value* value) {
393 return false;
393 } 394 }
394 395
395 void PolicyProvider::ClearAllContentSettingsRules( 396 void PolicyProvider::ClearAllContentSettingsRules(
396 ContentSettingsType content_type) { 397 ContentSettingsType content_type) {
397 } 398 }
398 399
399 void PolicyProvider::ShutdownOnUIThread() { 400 void PolicyProvider::ShutdownOnUIThread() {
400 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 401 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
401 RemoveAllObservers(); 402 RemoveAllObservers();
402 if (!prefs_) 403 if (!prefs_)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 NOTREACHED() << "Unexpected notification"; 449 NOTREACHED() << "Unexpected notification";
449 return; 450 return;
450 } 451 }
451 NotifyObservers(ContentSettingsPattern(), 452 NotifyObservers(ContentSettingsPattern(),
452 ContentSettingsPattern(), 453 ContentSettingsPattern(),
453 CONTENT_SETTINGS_TYPE_DEFAULT, 454 CONTENT_SETTINGS_TYPE_DEFAULT,
454 std::string()); 455 std::string());
455 } 456 }
456 457
457 } // namespace content_settings 458 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698