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

Side by Side Diff: chrome/browser/managed_mode/managed_user_service.cc

Issue 12210136: Revert 181812 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/managed_mode/managed_user_service.h" 5 #include "chrome/browser/managed_mode/managed_user_service.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // static 101 // static
102 void ManagedUserService::RegisterUserPrefs(PrefRegistrySyncable* registry) { 102 void ManagedUserService::RegisterUserPrefs(PrefRegistrySyncable* registry) {
103 registry->RegisterDictionaryPref(prefs::kManagedModeManualHosts, 103 registry->RegisterDictionaryPref(prefs::kManagedModeManualHosts,
104 PrefRegistrySyncable::UNSYNCABLE_PREF); 104 PrefRegistrySyncable::UNSYNCABLE_PREF);
105 registry->RegisterDictionaryPref(prefs::kManagedModeManualURLs, 105 registry->RegisterDictionaryPref(prefs::kManagedModeManualURLs,
106 PrefRegistrySyncable::UNSYNCABLE_PREF); 106 PrefRegistrySyncable::UNSYNCABLE_PREF);
107 registry->RegisterIntegerPref(prefs::kDefaultManagedModeFilteringBehavior, 107 registry->RegisterIntegerPref(prefs::kDefaultManagedModeFilteringBehavior,
108 ManagedModeURLFilter::BLOCK, 108 ManagedModeURLFilter::BLOCK,
109 PrefRegistrySyncable::UNSYNCABLE_PREF); 109 PrefRegistrySyncable::UNSYNCABLE_PREF);
110 registry->RegisterStringPref(prefs::kManagedModeLocalPassphrase,
111 "",
112 PrefRegistrySyncable::UNSYNCABLE_PREF);
113 registry->RegisterStringPref(prefs::kManagedModeLocalSalt,
114 "",
115 PrefRegistrySyncable::UNSYNCABLE_PREF);
116 } 110 }
117 111
118 scoped_refptr<const ManagedModeURLFilter> 112 scoped_refptr<const ManagedModeURLFilter>
119 ManagedUserService::GetURLFilterForIOThread() { 113 ManagedUserService::GetURLFilterForIOThread() {
120 return url_filter_context_.io_url_filter(); 114 return url_filter_context_.io_url_filter();
121 } 115 }
122 116
123 ManagedModeURLFilter* ManagedUserService::GetURLFilterForUIThread() { 117 ManagedModeURLFilter* ManagedUserService::GetURLFilterForUIThread() {
124 return url_filter_context_.ui_url_filter(); 118 return url_filter_context_.ui_url_filter();
125 } 119 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 profile_->GetPrefs()->GetDictionary(prefs::kManagedModeManualURLs); 360 profile_->GetPrefs()->GetDictionary(prefs::kManagedModeManualURLs);
367 scoped_ptr<std::map<GURL, bool> > url_map(new std::map<GURL, bool>()); 361 scoped_ptr<std::map<GURL, bool> > url_map(new std::map<GURL, bool>());
368 for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { 362 for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
369 bool allow = false; 363 bool allow = false;
370 bool result = it.value().GetAsBoolean(&allow); 364 bool result = it.value().GetAsBoolean(&allow);
371 DCHECK(result); 365 DCHECK(result);
372 (*url_map)[GURL(it.key())] = allow; 366 (*url_map)[GURL(it.key())] = allow;
373 } 367 }
374 url_filter_context_.SetManualURLs(url_map.Pass()); 368 url_filter_context_.SetManualURLs(url_map.Pass());
375 } 369 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/managed_user_set_passphrase.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698