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

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

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 base::Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() { 756 base::Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() {
757 DCHECK_CURRENTLY_ON(BrowserThread::UI); 757 DCHECK_CURRENTLY_ON(BrowserThread::UI);
758 base::ListValue* protocol_handlers = new base::ListValue(); 758 base::ListValue* protocol_handlers = new base::ListValue();
759 for (ProtocolHandlerMultiMap::iterator i = user_protocol_handlers_.begin(); 759 for (ProtocolHandlerMultiMap::iterator i = user_protocol_handlers_.begin();
760 i != user_protocol_handlers_.end(); 760 i != user_protocol_handlers_.end();
761 ++i) { 761 ++i) {
762 for (ProtocolHandlerList::iterator j = i->second.begin(); 762 for (ProtocolHandlerList::iterator j = i->second.begin();
763 j != i->second.end(); ++j) { 763 j != i->second.end(); ++j) {
764 std::unique_ptr<base::DictionaryValue> encoded = j->Encode(); 764 std::unique_ptr<base::DictionaryValue> encoded = j->Encode();
765 if (IsDefault(*j)) { 765 if (IsDefault(*j)) {
766 encoded->Set("default", new base::FundamentalValue(true)); 766 encoded->Set("default", new base::Value(true));
767 } 767 }
768 protocol_handlers->Append(std::move(encoded)); 768 protocol_handlers->Append(std::move(encoded));
769 } 769 }
770 } 770 }
771 return protocol_handlers; 771 return protocol_handlers;
772 } 772 }
773 773
774 base::Value* ProtocolHandlerRegistry::EncodeIgnoredHandlers() { 774 base::Value* ProtocolHandlerRegistry::EncodeIgnoredHandlers() {
775 DCHECK_CURRENTLY_ON(BrowserThread::UI); 775 DCHECK_CURRENTLY_ON(BrowserThread::UI);
776 base::ListValue* handlers = new base::ListValue(); 776 base::ListValue* handlers = new base::ListValue();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 924
925 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 925 std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
926 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { 926 ProtocolHandlerRegistry::CreateJobInterceptorFactory() {
927 DCHECK_CURRENTLY_ON(BrowserThread::UI); 927 DCHECK_CURRENTLY_ON(BrowserThread::UI);
928 // this is always created on the UI thread (in profile_io's 928 // this is always created on the UI thread (in profile_io's
929 // InitializeOnUIThread. Any method calls must be done 929 // InitializeOnUIThread. Any method calls must be done
930 // on the IO thread (this is checked). 930 // on the IO thread (this is checked).
931 return std::unique_ptr<JobInterceptorFactory>( 931 return std::unique_ptr<JobInterceptorFactory>(
932 new JobInterceptorFactory(io_thread_delegate_.get())); 932 new JobInterceptorFactory(io_thread_delegate_.get()));
933 } 933 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map_unittest.cc ('k') | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698