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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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/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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 value_.release()); 80 value_.release());
81 } 81 }
82 82
83 private: 83 private:
84 scoped_ptr<base::Value> value_; 84 scoped_ptr<base::Value> value_;
85 }; 85 };
86 86
87 } // namespace 87 } // namespace
88 88
89 // static 89 // static
90 void DefaultProvider::RegisterUserPrefs( 90 void DefaultProvider::RegisterProfilePrefs(
91 user_prefs::PrefRegistrySyncable* registry) { 91 user_prefs::PrefRegistrySyncable* registry) {
92 // The registration of the preference prefs::kDefaultContentSettings should 92 // The registration of the preference prefs::kDefaultContentSettings should
93 // also include the default values for default content settings. This allows 93 // also include the default values for default content settings. This allows
94 // functional tests to get default content settings by reading the preference 94 // functional tests to get default content settings by reading the preference
95 // prefs::kDefaultContentSettings via pyauto. 95 // prefs::kDefaultContentSettings via pyauto.
96 // TODO(markusheintz): Write pyauto hooks for the content settings map as 96 // TODO(markusheintz): Write pyauto hooks for the content settings map as
97 // content settings should be read from the host content settings map. 97 // content settings should be read from the host content settings map.
98 DictionaryValue* default_content_settings = new DictionaryValue(); 98 DictionaryValue* default_content_settings = new DictionaryValue();
99 registry->RegisterDictionaryPref( 99 registry->RegisterDictionaryPref(
100 prefs::kDefaultContentSettings, 100 prefs::kDefaultContentSettings,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Migrate obsolete cookie prompt mode. 320 // Migrate obsolete cookie prompt mode.
321 if (ValueToContentSetting( 321 if (ValueToContentSetting(
322 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == 322 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) ==
323 CONTENT_SETTING_ASK) { 323 CONTENT_SETTING_ASK) {
324 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( 324 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset(
325 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK)); 325 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
326 } 326 }
327 } 327 }
328 328
329 } // namespace content_settings 329 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698