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

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

Issue 9293010: Merge 119773 - Move click-to-play out of chrome://flags. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/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) 2011 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/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"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 } 343 }
344 } 344 }
345 // Migrate obsolete cookie prompt mode. 345 // Migrate obsolete cookie prompt mode.
346 if (ValueToContentSetting( 346 if (ValueToContentSetting(
347 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == 347 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) ==
348 CONTENT_SETTING_ASK) { 348 CONTENT_SETTING_ASK) {
349 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( 349 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset(
350 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK)); 350 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
351 } 351 }
352
353 if (default_settings_[CONTENT_SETTINGS_TYPE_PLUGINS].get()) {
354 ContentSetting plugin_setting = ValueToContentSetting(
355 default_settings_[CONTENT_SETTINGS_TYPE_PLUGINS].get());
356 plugin_setting =
357 ClickToPlayFixup(CONTENT_SETTINGS_TYPE_PLUGINS, plugin_setting);
358 default_settings_[CONTENT_SETTINGS_TYPE_PLUGINS].reset(
359 Value::CreateIntegerValue(plugin_setting));
360 }
361 } 352 }
362 353
363 void DefaultProvider::MigrateObsoleteNotificationPref() { 354 void DefaultProvider::MigrateObsoleteNotificationPref() {
364 if (prefs_->HasPrefPath(prefs::kDesktopNotificationDefaultContentSetting)) { 355 if (prefs_->HasPrefPath(prefs::kDesktopNotificationDefaultContentSetting)) {
365 const base::Value* value = prefs_->FindPreference( 356 const base::Value* value = prefs_->FindPreference(
366 prefs::kDesktopNotificationDefaultContentSetting)->GetValue(); 357 prefs::kDesktopNotificationDefaultContentSetting)->GetValue();
367 // Do not clear the old preference yet as long as we need to maintain 358 // Do not clear the old preference yet as long as we need to maintain
368 // backward compatibility. 359 // backward compatibility.
369 SetWebsiteSetting( 360 SetWebsiteSetting(
370 ContentSettingsPattern::Wildcard(), 361 ContentSettingsPattern::Wildcard(),
(...skipping 14 matching lines...) Expand all
385 SetWebsiteSetting( 376 SetWebsiteSetting(
386 ContentSettingsPattern::Wildcard(), 377 ContentSettingsPattern::Wildcard(),
387 ContentSettingsPattern::Wildcard(), 378 ContentSettingsPattern::Wildcard(),
388 CONTENT_SETTINGS_TYPE_GEOLOCATION, 379 CONTENT_SETTINGS_TYPE_GEOLOCATION,
389 std::string(), 380 std::string(),
390 value->DeepCopy()); 381 value->DeepCopy());
391 } 382 }
392 } 383 }
393 384
394 } // namespace content_settings 385 } // 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