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

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: 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 && 333 return setting == CONTENT_SETTING_ASK;
Peter Kasting 2012/01/30 20:35:22 Nit: Just remove this line and group with the 4 be
Bernhard Bauer 2012/01/30 20:56:47 Done.
334 CommandLine::ForCurrentProcess()->HasSwitch(
335 switches::kEnableClickToPlay);
336 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 334 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
337 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 335 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
338 case CONTENT_SETTINGS_TYPE_INTENTS: 336 case CONTENT_SETTINGS_TYPE_INTENTS:
339 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 337 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
340 return setting == CONTENT_SETTING_ASK; 338 return setting == CONTENT_SETTING_ASK;
341 default: 339 default:
342 return false; 340 return false;
343 } 341 }
344 } 342 }
345 343
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 453 }
456 } 454 }
457 455
458 if (info) { 456 if (info) {
459 info->source = content_settings::SETTING_SOURCE_NONE; 457 info->source = content_settings::SETTING_SOURCE_NONE;
460 info->primary_pattern = ContentSettingsPattern(); 458 info->primary_pattern = ContentSettingsPattern();
461 info->secondary_pattern = ContentSettingsPattern(); 459 info->secondary_pattern = ContentSettingsPattern();
462 } 460 }
463 return NULL; 461 return NULL;
464 } 462 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698