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/host_content_settings_map.cc

Issue 9293008: Move click-to-play out of chrome://flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 10 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/content_settings/host_content_settings_map.h" 5 #include "chrome/browser/content_settings/host_content_settings_map.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // DEFAULT, ALLOW and BLOCK are always allowed. 323 // DEFAULT, ALLOW and BLOCK are always allowed.
324 if (setting == CONTENT_SETTING_DEFAULT || 324 if (setting == CONTENT_SETTING_DEFAULT ||
325 setting == CONTENT_SETTING_ALLOW || 325 setting == CONTENT_SETTING_ALLOW ||
326 setting == CONTENT_SETTING_BLOCK) { 326 setting == CONTENT_SETTING_BLOCK) {
327 return true; 327 return true;
328 } 328 }
329 switch (content_type) { 329 switch (content_type) {
330 case CONTENT_SETTINGS_TYPE_COOKIES: 330 case CONTENT_SETTINGS_TYPE_COOKIES:
331 return setting == CONTENT_SETTING_SESSION_ONLY; 331 return setting == CONTENT_SETTING_SESSION_ONLY;
332 case CONTENT_SETTINGS_TYPE_PLUGINS: 332 case CONTENT_SETTINGS_TYPE_PLUGINS:
333 return setting == CONTENT_SETTING_ASK &&
334 CommandLine::ForCurrentProcess()->HasSwitch(
335 switches::kEnableClickToPlay);
336 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 333 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
337 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 334 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
338 case CONTENT_SETTINGS_TYPE_INTENTS: 335 case CONTENT_SETTINGS_TYPE_INTENTS:
339 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 336 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
340 return setting == CONTENT_SETTING_ASK; 337 return setting == CONTENT_SETTING_ASK;
341 default: 338 default:
342 return false; 339 return false;
343 } 340 }
344 } 341 }
345 342
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 452 }
456 } 453 }
457 454
458 if (info) { 455 if (info) {
459 info->source = content_settings::SETTING_SOURCE_NONE; 456 info->source = content_settings::SETTING_SOURCE_NONE;
460 info->primary_pattern = ContentSettingsPattern(); 457 info->primary_pattern = ContentSettingsPattern();
461 info->secondary_pattern = ContentSettingsPattern(); 458 info->secondary_pattern = ContentSettingsPattern();
462 } 459 }
463 return NULL; 460 return NULL;
464 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698