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

Side by Side Diff: chrome/browser/net/pref_proxy_config_tracker_impl.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. 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) 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/net/pref_proxy_config_tracker_impl.h" 5 #include "chrome/browser/net/pref_proxy_config_tracker_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/prefs/pref_registry_simple.h"
9 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" 11 #include "chrome/browser/prefs/proxy_config_dictionary.h"
11 #include "chrome/common/chrome_notification_types.h" 12 #include "chrome/common/chrome_notification_types.h"
12 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "content/public/browser/notification_details.h" 15 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_source.h" 16 #include "content/public/browser/notification_source.h"
16 17
17 using content::BrowserThread; 18 using content::BrowserThread;
18 19
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 *effective_config = net::ProxyConfig::CreateDirect(); 189 *effective_config = net::ProxyConfig::CreateDirect();
189 return net::ProxyConfigService::CONFIG_VALID; 190 return net::ProxyConfigService::CONFIG_VALID;
190 } 191 }
191 192
192 *effective_config_state = ProxyPrefs::CONFIG_SYSTEM; 193 *effective_config_state = ProxyPrefs::CONFIG_SYSTEM;
193 *effective_config = system_config; 194 *effective_config = system_config;
194 return system_availability; 195 return system_availability;
195 } 196 }
196 197
197 // static 198 // static
198 void PrefProxyConfigTrackerImpl::RegisterPrefs( 199 void PrefProxyConfigTrackerImpl::RegisterPrefs(PrefRegistrySimple* registry) {
199 PrefServiceSimple* local_state) {
200 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem(); 200 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem();
201 local_state->RegisterDictionaryPref(prefs::kProxy, default_settings); 201 registry->RegisterDictionaryPref(prefs::kProxy, default_settings);
202 } 202 }
203 203
204 // static 204 // static
205 void PrefProxyConfigTrackerImpl::RegisterUserPrefs( 205 void PrefProxyConfigTrackerImpl::RegisterUserPrefs(
206 PrefServiceSyncable* pref_service) { 206 PrefServiceSyncable* pref_service) {
207 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem(); 207 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem();
208 pref_service->RegisterDictionaryPref(prefs::kProxy, 208 pref_service->RegisterDictionaryPref(prefs::kProxy,
209 default_settings, 209 default_settings,
210 PrefServiceSyncable::UNSYNCABLE_PREF); 210 PrefServiceSyncable::UNSYNCABLE_PREF);
211 } 211 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 config_state = ProxyPrefs::CONFIG_EXTENSION; 336 config_state = ProxyPrefs::CONFIG_EXTENSION;
337 else 337 else
338 config_state = ProxyPrefs::CONFIG_OTHER_PRECEDE; 338 config_state = ProxyPrefs::CONFIG_OTHER_PRECEDE;
339 } else { 339 } else {
340 config_state = ProxyPrefs::CONFIG_FALLBACK; 340 config_state = ProxyPrefs::CONFIG_FALLBACK;
341 } 341 }
342 } 342 }
343 343
344 return config_state; 344 return config_state;
345 } 345 }
OLDNEW
« no previous file with comments | « chrome/browser/net/pref_proxy_config_tracker_impl.h ('k') | chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698