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

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

Issue 267103002: Ignore title parameter for navigator.registerProtocolHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 7 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 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 411 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
412 return GetHandlerFor(handler.protocol()) == handler; 412 return GetHandlerFor(handler.protocol()) == handler;
413 } 413 }
414 414
415 void ProtocolHandlerRegistry::InstallDefaultsForChromeOS() { 415 void ProtocolHandlerRegistry::InstallDefaultsForChromeOS() {
416 #if defined(OS_CHROMEOS) 416 #if defined(OS_CHROMEOS)
417 // Only chromeos has default protocol handlers at this point. 417 // Only chromeos has default protocol handlers at this point.
418 AddPredefinedHandler( 418 AddPredefinedHandler(
419 ProtocolHandler::CreateProtocolHandler( 419 ProtocolHandler::CreateProtocolHandler(
420 "mailto", 420 "mailto",
421 GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_MAILTO_HANDLER_URL)), 421 GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_MAILTO_HANDLER_URL))));
422 l10n_util::GetStringUTF16(IDS_GOOGLE_MAILTO_HANDLER_NAME)));
423 AddPredefinedHandler( 422 AddPredefinedHandler(
424 ProtocolHandler::CreateProtocolHandler( 423 ProtocolHandler::CreateProtocolHandler(
425 "webcal", 424 "webcal",
426 GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_WEBCAL_HANDLER_URL)), 425 GURL(l10n_util::GetStringUTF8(IDS_GOOGLE_WEBCAL_HANDLER_URL))));
427 l10n_util::GetStringUTF16(IDS_GOOGLE_WEBCAL_HANDLER_NAME)));
428 #else 426 #else
429 NOTREACHED(); // this method should only ever be called in chromeos. 427 NOTREACHED(); // this method should only ever be called in chromeos.
430 #endif 428 #endif
431 } 429 }
432 430
433 void ProtocolHandlerRegistry::InitProtocolSettings() { 431 void ProtocolHandlerRegistry::InitProtocolSettings() {
434 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 432 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
435 433
436 // Any further default additions to the table will get rejected from now on. 434 // Any further default additions to the table will get rejected from now on.
437 is_loaded_ = true; 435 is_loaded_ = true;
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 878
881 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 879 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
882 ProtocolHandlerRegistry::CreateJobInterceptorFactory() { 880 ProtocolHandlerRegistry::CreateJobInterceptorFactory() {
883 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 881 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
884 // this is always created on the UI thread (in profile_io's 882 // this is always created on the UI thread (in profile_io's
885 // InitializeOnUIThread. Any method calls must be done 883 // InitializeOnUIThread. Any method calls must be done
886 // on the IO thread (this is checked). 884 // on the IO thread (this is checked).
887 return scoped_ptr<JobInterceptorFactory>( 885 return scoped_ptr<JobInterceptorFactory>(
888 new JobInterceptorFactory(io_thread_delegate_.get())); 886 new JobInterceptorFactory(io_thread_delegate_.get()));
889 } 887 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698