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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 7 years, 12 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 #include "chrome/browser/net/http_server_properties_manager.h" 4 #include "chrome/browser/net/http_server_properties_manager.h"
5 5
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 void HttpServerPropertiesManager::ShutdownOnUIThread() { 83 void HttpServerPropertiesManager::ShutdownOnUIThread() {
84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 84 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
85 // Cancel any pending updates, and stop listening for pref change updates. 85 // Cancel any pending updates, and stop listening for pref change updates.
86 ui_cache_update_timer_->Stop(); 86 ui_cache_update_timer_->Stop();
87 ui_weak_ptr_factory_.reset(); 87 ui_weak_ptr_factory_.reset();
88 pref_change_registrar_.RemoveAll(); 88 pref_change_registrar_.RemoveAll();
89 } 89 }
90 90
91 // static 91 // static
92 void HttpServerPropertiesManager::RegisterPrefs(PrefService* prefs) { 92 void HttpServerPropertiesManager::RegisterUserPrefs(
93 PrefServiceSyncable* prefs) {
93 prefs->RegisterDictionaryPref(prefs::kHttpServerProperties, 94 prefs->RegisterDictionaryPref(prefs::kHttpServerProperties,
94 PrefService::UNSYNCABLE_PREF); 95 PrefServiceSyncable::UNSYNCABLE_PREF);
95 } 96 }
96 97
97 // This is required for conformance with the HttpServerProperties interface. 98 // This is required for conformance with the HttpServerProperties interface.
98 void HttpServerPropertiesManager::Clear() { 99 void HttpServerPropertiesManager::Clear() {
99 Clear(base::Closure()); 100 Clear(base::Closure());
100 } 101 }
101 102
102 void HttpServerPropertiesManager::Clear(const base::Closure& completion) { 103 void HttpServerPropertiesManager::Clear(const base::Closure& completion) {
103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
104 105
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 completion.Run(); 660 completion.Run();
660 } 661 }
661 662
662 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { 663 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() {
663 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 664 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
664 if (!setting_prefs_) 665 if (!setting_prefs_)
665 ScheduleUpdateCacheOnUI(); 666 ScheduleUpdateCacheOnUI();
666 } 667 }
667 668
668 } // namespace chrome_browser_net 669 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/http_server_properties_manager.h ('k') | chrome/browser/net/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698