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

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

Issue 7647026: base: Add three helper functions to Values API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a typo Ceate -> Create Created 9 years, 4 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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/extensions/extension_accessibility_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698