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

Side by Side Diff: chrome/browser/content_settings/content_settings_default_provider.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) 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_default_provider.h" 5 #include "chrome/browser/content_settings/content_settings_default_provider.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 343 }
344 } 344 }
345 } 345 }
346 // Migrate obsolete cookie prompt mode. 346 // Migrate obsolete cookie prompt mode.
347 if (ValueToContentSetting( 347 if (ValueToContentSetting(
348 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == 348 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) ==
349 CONTENT_SETTING_ASK) { 349 CONTENT_SETTING_ASK) {
350 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( 350 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset(
351 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK)); 351 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
352 } 352 }
353
354 if (default_settings_[CONTENT_SETTINGS_TYPE_PLUGINS].get()) {
355 ContentSetting plugin_setting = ValueToContentSetting(
356 default_settings_[CONTENT_SETTINGS_TYPE_PLUGINS].get());
357 plugin_setting =
358 ClickToPlayFixup(CONTENT_SETTINGS_TYPE_PLUGINS, plugin_setting);
359 default_settings_[CONTENT_SETTINGS_TYPE_PLUGINS].reset(
360 Value::CreateIntegerValue(plugin_setting));
361 }
362 } 353 }
363 354
364 void DefaultProvider::MigrateObsoleteNotificationPref() { 355 void DefaultProvider::MigrateObsoleteNotificationPref() {
365 if (prefs_->HasPrefPath(prefs::kDesktopNotificationDefaultContentSetting)) { 356 if (prefs_->HasPrefPath(prefs::kDesktopNotificationDefaultContentSetting)) {
366 const base::Value* value = prefs_->FindPreference( 357 const base::Value* value = prefs_->FindPreference(
367 prefs::kDesktopNotificationDefaultContentSetting)->GetValue(); 358 prefs::kDesktopNotificationDefaultContentSetting)->GetValue();
368 // Do not clear the old preference yet as long as we need to maintain 359 // Do not clear the old preference yet as long as we need to maintain
369 // backward compatibility. 360 // backward compatibility.
370 SetWebsiteSetting( 361 SetWebsiteSetting(
371 ContentSettingsPattern::Wildcard(), 362 ContentSettingsPattern::Wildcard(),
(...skipping 14 matching lines...) Expand all
386 SetWebsiteSetting( 377 SetWebsiteSetting(
387 ContentSettingsPattern::Wildcard(), 378 ContentSettingsPattern::Wildcard(),
388 ContentSettingsPattern::Wildcard(), 379 ContentSettingsPattern::Wildcard(),
389 CONTENT_SETTINGS_TYPE_GEOLOCATION, 380 CONTENT_SETTINGS_TYPE_GEOLOCATION,
390 std::string(), 381 std::string(),
391 value->DeepCopy()); 382 value->DeepCopy());
392 } 383 }
393 } 384 }
394 385
395 } // namespace content_settings 386 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/content_settings/content_settings_pref_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698