OLD | NEW |
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/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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() { | 375 Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() { |
376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
377 ListValue* protocol_handlers = new ListValue(); | 377 ListValue* protocol_handlers = new ListValue(); |
378 for (ProtocolHandlerMultiMap::iterator i = protocol_handlers_.begin(); | 378 for (ProtocolHandlerMultiMap::iterator i = protocol_handlers_.begin(); |
379 i != protocol_handlers_.end(); ++i) { | 379 i != protocol_handlers_.end(); ++i) { |
380 for (ProtocolHandlerList::iterator j = i->second.begin(); | 380 for (ProtocolHandlerList::iterator j = i->second.begin(); |
381 j != i->second.end(); ++j) { | 381 j != i->second.end(); ++j) { |
382 DictionaryValue* encoded = j->Encode(); | 382 DictionaryValue* encoded = j->Encode(); |
383 if (IsDefault(*j)) { | 383 if (IsDefault(*j)) { |
384 encoded->Set("default", Value::CreateBooleanValue(true)); | 384 encoded->Set("default", base::TrueValue()); |
385 } | 385 } |
386 protocol_handlers->Append(encoded); | 386 protocol_handlers->Append(encoded); |
387 } | 387 } |
388 } | 388 } |
389 return protocol_handlers; | 389 return protocol_handlers; |
390 } | 390 } |
391 | 391 |
392 Value* ProtocolHandlerRegistry::EncodeIgnoredHandlers() { | 392 Value* ProtocolHandlerRegistry::EncodeIgnoredHandlers() { |
393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
394 ListValue* handlers = new ListValue(); | 394 ListValue* handlers = new ListValue(); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 } | 624 } |
625 } else { | 625 } else { |
626 NOTREACHED(); | 626 NOTREACHED(); |
627 } | 627 } |
628 } | 628 } |
629 | 629 |
630 void ProtocolHandlerRegistry::DefaultClientObserver::SetWorker( | 630 void ProtocolHandlerRegistry::DefaultClientObserver::SetWorker( |
631 ShellIntegration::DefaultProtocolClientWorker* worker) { | 631 ShellIntegration::DefaultProtocolClientWorker* worker) { |
632 worker_ = worker; | 632 worker_ = worker; |
633 } | 633 } |
OLD | NEW |