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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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
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 4
5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 5 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 // Observers remove themselves from this list when they are deleted; so 720 // Observers remove themselves from this list when they are deleted; so
721 // we delete the last item until none are left in the list. 721 // we delete the last item until none are left in the list.
722 while (!default_client_observers_.empty()) { 722 while (!default_client_observers_.empty()) {
723 delete default_client_observers_.back(); 723 delete default_client_observers_.back();
724 } 724 }
725 } 725 }
726 726
727 // static 727 // static
728 void ProtocolHandlerRegistry::RegisterProfilePrefs( 728 void ProtocolHandlerRegistry::RegisterProfilePrefs(
729 user_prefs::PrefRegistrySyncable* registry) { 729 user_prefs::PrefRegistrySyncable* registry) {
730 registry->RegisterListPref(prefs::kRegisteredProtocolHandlers, 730 registry->RegisterListPref(prefs::kRegisteredProtocolHandlers);
731 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 731 registry->RegisterListPref(prefs::kIgnoredProtocolHandlers);
732 registry->RegisterListPref(prefs::kIgnoredProtocolHandlers, 732 registry->RegisterListPref(prefs::kPolicyRegisteredProtocolHandlers);
733 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 733 registry->RegisterListPref(prefs::kPolicyIgnoredProtocolHandlers);
734 registry->RegisterListPref(prefs::kPolicyRegisteredProtocolHandlers, 734 registry->RegisterBooleanPref(prefs::kCustomHandlersEnabled, true);
735 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
736 registry->RegisterListPref(prefs::kPolicyIgnoredProtocolHandlers,
737 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
738 registry->RegisterBooleanPref(
739 prefs::kCustomHandlersEnabled,
740 true,
741 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
742 } 735 }
743 736
744 ProtocolHandlerRegistry::~ProtocolHandlerRegistry() { 737 ProtocolHandlerRegistry::~ProtocolHandlerRegistry() {
745 DCHECK_CURRENTLY_ON(BrowserThread::UI); 738 DCHECK_CURRENTLY_ON(BrowserThread::UI);
746 DCHECK(default_client_observers_.empty()); 739 DCHECK(default_client_observers_.empty());
747 } 740 }
748 741
749 void ProtocolHandlerRegistry::PromoteHandler(const ProtocolHandler& handler) { 742 void ProtocolHandlerRegistry::PromoteHandler(const ProtocolHandler& handler) {
750 DCHECK_CURRENTLY_ON(BrowserThread::UI); 743 DCHECK_CURRENTLY_ON(BrowserThread::UI);
751 DCHECK(IsRegistered(handler)); 744 DCHECK(IsRegistered(handler));
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 963
971 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 964 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
972 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { 965 ProtocolHandlerRegistry::CreateJobInterceptorFactory() {
973 DCHECK_CURRENTLY_ON(BrowserThread::UI); 966 DCHECK_CURRENTLY_ON(BrowserThread::UI);
974 // this is always created on the UI thread (in profile_io's 967 // this is always created on the UI thread (in profile_io's
975 // InitializeOnUIThread. Any method calls must be done 968 // InitializeOnUIThread. Any method calls must be done
976 // on the IO thread (this is checked). 969 // on the IO thread (this is checked).
977 return scoped_ptr<JobInterceptorFactory>( 970 return scoped_ptr<JobInterceptorFactory>(
978 new JobInterceptorFactory(io_thread_delegate_.get())); 971 new JobInterceptorFactory(io_thread_delegate_.get()));
979 } 972 }
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/sw_reporter_installer_win.cc ('k') | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698