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

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

Issue 7049007: Origin Identifier Value Map. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 7 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) 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 5
6 #include "chrome/browser/content_settings/content_settings_base_provider.h" 6 #include "chrome/browser/content_settings/content_settings_base_provider.h"
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 ExtendedContentSettings::~ExtendedContentSettings() {} 40 ExtendedContentSettings::~ExtendedContentSettings() {}
41 41
42 BaseProvider::BaseProvider(bool is_incognito) 42 BaseProvider::BaseProvider(bool is_incognito)
43 : is_incognito_(is_incognito) { 43 : is_incognito_(is_incognito) {
44 } 44 }
45 45
46 BaseProvider::~BaseProvider() {} 46 BaseProvider::~BaseProvider() {}
47 47
48 //static
48 bool BaseProvider::RequiresResourceIdentifier( 49 bool BaseProvider::RequiresResourceIdentifier(
49 ContentSettingsType content_type) const { 50 ContentSettingsType content_type) {
50 if (CommandLine::ForCurrentProcess()->HasSwitch( 51 if (CommandLine::ForCurrentProcess()->HasSwitch(
51 switches::kEnableResourceContentSettings)) { 52 switches::kEnableResourceContentSettings)) {
52 return kRequiresResourceIdentifier[content_type]; 53 return kRequiresResourceIdentifier[content_type];
53 } else { 54 } else {
54 return false; 55 return false;
55 } 56 }
56 } 57 }
57 58
58 bool BaseProvider::AllDefault( 59 bool BaseProvider::AllDefault(
59 const ExtendedContentSettings& settings) const { 60 const ExtendedContentSettings& settings) const {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (setting == CONTENT_SETTING_ASK && 247 if (setting == CONTENT_SETTING_ASK &&
247 content_type == CONTENT_SETTINGS_TYPE_PLUGINS && 248 content_type == CONTENT_SETTINGS_TYPE_PLUGINS &&
248 !CommandLine::ForCurrentProcess()->HasSwitch( 249 !CommandLine::ForCurrentProcess()->HasSwitch(
249 switches::kEnableClickToPlay)) { 250 switches::kEnableClickToPlay)) {
250 return CONTENT_SETTING_BLOCK; 251 return CONTENT_SETTING_BLOCK;
251 } 252 }
252 return setting; 253 return setting;
253 } 254 }
254 255
255 } // namespace content_settings 256 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698