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

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

Issue 2458093003: Add DCHECKs to validate ProfileIOData's list of protocols.
Patch Set: Merge remote-tracking branch 'origin/master' into detect_unregistered_schemes Created 4 years, 1 month 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 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 30 matching lines...) Expand all
41 }; 41 };
42 42
43 // |Delegate| provides an interface for interacting asynchronously 43 // |Delegate| provides an interface for interacting asynchronously
44 // with the underlying OS for the purposes of registering Chrome 44 // with the underlying OS for the purposes of registering Chrome
45 // as the default handler for specific protocols. 45 // as the default handler for specific protocols.
46 class Delegate { 46 class Delegate {
47 public: 47 public:
48 virtual ~Delegate(); 48 virtual ~Delegate();
49 virtual void RegisterExternalHandler(const std::string& protocol); 49 virtual void RegisterExternalHandler(const std::string& protocol);
50 virtual void DeregisterExternalHandler(const std::string& protocol); 50 virtual void DeregisterExternalHandler(const std::string& protocol);
51 virtual bool IsExternalHandlerRegistered(const std::string& protocol); 51 virtual bool CanSchemeBeOverridden(const std::string& protocol);
52 virtual scoped_refptr<shell_integration::DefaultProtocolClientWorker> 52 virtual scoped_refptr<shell_integration::DefaultProtocolClientWorker>
53 CreateShellWorker( 53 CreateShellWorker(
54 const shell_integration::DefaultWebClientWorkerCallback& callback, 54 const shell_integration::DefaultWebClientWorkerCallback& callback,
55 const std::string& protocol); 55 const std::string& protocol);
56 virtual void RegisterWithOSAsDefaultClient( 56 virtual void RegisterWithOSAsDefaultClient(
57 const std::string& protocol, 57 const std::string& protocol,
58 ProtocolHandlerRegistry* registry); 58 ProtocolHandlerRegistry* registry);
59 }; 59 };
60 60
61 // Forward declaration of the internal implementation class. 61 // Forward declaration of the internal implementation class.
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // are posted to the IO thread where updates are applied to this object. 364 // are posted to the IO thread where updates are applied to this object.
365 scoped_refptr<IOThreadDelegate> io_thread_delegate_; 365 scoped_refptr<IOThreadDelegate> io_thread_delegate_;
366 366
367 // Makes it possible to invalidate the callback for the 367 // Makes it possible to invalidate the callback for the
368 // DefaultProtocolClientWorker. 368 // DefaultProtocolClientWorker.
369 base::WeakPtrFactory<ProtocolHandlerRegistry> weak_ptr_factory_; 369 base::WeakPtrFactory<ProtocolHandlerRegistry> weak_ptr_factory_;
370 370
371 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); 371 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry);
372 }; 372 };
373 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 373 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698