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

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: Created 7 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) 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_registrar_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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return net::ProxyConfigService::CONFIG_VALID; 191 return net::ProxyConfigService::CONFIG_VALID;
191 } 192 }
192 193
193 *effective_config_state = ProxyPrefs::CONFIG_SYSTEM; 194 *effective_config_state = ProxyPrefs::CONFIG_SYSTEM;
194 *effective_config = system_config; 195 *effective_config = system_config;
195 return system_availability; 196 return system_availability;
196 } 197 }
197 198
198 // static 199 // static
199 void PrefProxyConfigTrackerImpl::RegisterPrefs( 200 void PrefProxyConfigTrackerImpl::RegisterPrefs(
200 PrefServiceSimple* local_state) { 201 PrefRegistrarSimple* local_state) {
201 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem(); 202 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem();
202 local_state->RegisterDictionaryPref(prefs::kProxy, default_settings); 203 local_state->RegisterDictionaryPref(prefs::kProxy, default_settings);
203 } 204 }
204 205
205 // static 206 // static
206 void PrefProxyConfigTrackerImpl::RegisterUserPrefs( 207 void PrefProxyConfigTrackerImpl::RegisterUserPrefs(
207 PrefServiceSyncable* pref_service) { 208 PrefServiceSyncable* pref_service) {
208 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem(); 209 DictionaryValue* default_settings = ProxyConfigDictionary::CreateSystem();
209 pref_service->RegisterDictionaryPref(prefs::kProxy, 210 pref_service->RegisterDictionaryPref(prefs::kProxy,
210 default_settings, 211 default_settings,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 config_state = ProxyPrefs::CONFIG_EXTENSION; 338 config_state = ProxyPrefs::CONFIG_EXTENSION;
338 else 339 else
339 config_state = ProxyPrefs::CONFIG_OTHER_PRECEDE; 340 config_state = ProxyPrefs::CONFIG_OTHER_PRECEDE;
340 } else { 341 } else {
341 config_state = ProxyPrefs::CONFIG_FALLBACK; 342 config_state = ProxyPrefs::CONFIG_FALLBACK;
342 } 343 }
343 } 344 }
344 345
345 return config_state; 346 return config_state;
346 } 347 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698