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

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

Issue 6253012: Add ContentSettingsProvider Interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/policy_content_settings_provider.h" 5 #include "chrome/browser/content_settings/policy_content_settings_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/browser_thread.h" 10 #include "chrome/browser/browser_thread.h"
(...skipping 20 matching lines...) Expand all
31 prefs::kManagedDefaultImagesSetting, 31 prefs::kManagedDefaultImagesSetting,
32 prefs::kManagedDefaultJavaScriptSetting, 32 prefs::kManagedDefaultJavaScriptSetting,
33 prefs::kManagedDefaultPluginsSetting, 33 prefs::kManagedDefaultPluginsSetting,
34 prefs::kManagedDefaultPopupsSetting, 34 prefs::kManagedDefaultPopupsSetting,
35 NULL, // Not used for Geolocation 35 NULL, // Not used for Geolocation
36 NULL, // Not used for Notifications 36 NULL, // Not used for Notifications
37 }; 37 };
38 38
39 } // namespace 39 } // namespace
40 40
41 namespace content_settings {
42
41 PolicyContentSettingsProvider::PolicyContentSettingsProvider(Profile* profile) 43 PolicyContentSettingsProvider::PolicyContentSettingsProvider(Profile* profile)
42 : profile_(profile), 44 : profile_(profile),
43 is_off_the_record_(profile_->IsOffTheRecord()) { 45 is_off_the_record_(profile_->IsOffTheRecord()) {
44 PrefService* prefs = profile->GetPrefs(); 46 PrefService* prefs = profile->GetPrefs();
45 47
46 // Read global defaults. 48 // Read global defaults.
47 DCHECK_EQ(arraysize(kPrefToManageType), 49 DCHECK_EQ(arraysize(kPrefToManageType),
48 static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES)); 50 static_cast<size_t>(CONTENT_SETTINGS_NUM_TYPES));
49 ReadManagedDefaultSettings(); 51 ReadManagedDefaultSettings();
50 52
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 CONTENT_SETTING_DEFAULT); 198 CONTENT_SETTING_DEFAULT);
197 prefs->RegisterIntegerPref(prefs::kManagedDefaultImagesSetting, 199 prefs->RegisterIntegerPref(prefs::kManagedDefaultImagesSetting,
198 CONTENT_SETTING_DEFAULT); 200 CONTENT_SETTING_DEFAULT);
199 prefs->RegisterIntegerPref(prefs::kManagedDefaultJavaScriptSetting, 201 prefs->RegisterIntegerPref(prefs::kManagedDefaultJavaScriptSetting,
200 CONTENT_SETTING_DEFAULT); 202 CONTENT_SETTING_DEFAULT);
201 prefs->RegisterIntegerPref(prefs::kManagedDefaultPluginsSetting, 203 prefs->RegisterIntegerPref(prefs::kManagedDefaultPluginsSetting,
202 CONTENT_SETTING_DEFAULT); 204 CONTENT_SETTING_DEFAULT);
203 prefs->RegisterIntegerPref(prefs::kManagedDefaultPopupsSetting, 205 prefs->RegisterIntegerPref(prefs::kManagedDefaultPopupsSetting,
204 CONTENT_SETTING_DEFAULT); 206 CONTENT_SETTING_DEFAULT);
205 } 207 }
208
209 } // content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698