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

Side by Side Diff: chrome/browser/chrome_plugin_host.cc

Issue 5863001: net: Add namespace net to URLRequestErrorJob. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_protocols.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chrome_plugin_host.h" 5 #include "chrome/browser/chrome_plugin_host.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // intercept the request. 54 // intercept the request.
55 // NOTE: All methods must be called on the IO thread. 55 // NOTE: All methods must be called on the IO thread.
56 class PluginRequestInterceptor 56 class PluginRequestInterceptor
57 : public PluginHelper, public net::URLRequest::Interceptor { 57 : public PluginHelper, public net::URLRequest::Interceptor {
58 public: 58 public:
59 static net::URLRequestJob* UninterceptedProtocolHandler( 59 static net::URLRequestJob* UninterceptedProtocolHandler(
60 net::URLRequest* request, const std::string& scheme) { 60 net::URLRequest* request, const std::string& scheme) {
61 // This will get called if a plugin failed to intercept a request for a 61 // This will get called if a plugin failed to intercept a request for a
62 // protocol it has registered. In that case, we return NULL and the request 62 // protocol it has registered. In that case, we return NULL and the request
63 // will result in an error. 63 // will result in an error.
64 return new URLRequestErrorJob(request, net::ERR_FILE_NOT_FOUND); 64 return new net::URLRequestErrorJob(request, net::ERR_FILE_NOT_FOUND);
65 } 65 }
66 66
67 explicit PluginRequestInterceptor(ChromePluginLib* plugin) 67 explicit PluginRequestInterceptor(ChromePluginLib* plugin)
68 : PluginHelper(plugin) { 68 : PluginHelper(plugin) {
69 net::URLRequest::RegisterRequestInterceptor(this); 69 net::URLRequest::RegisterRequestInterceptor(this);
70 } 70 }
71 71
72 virtual ~PluginRequestInterceptor() { 72 virtual ~PluginRequestInterceptor() {
73 net::URLRequest::UnregisterRequestInterceptor(this); 73 net::URLRequest::UnregisterRequestInterceptor(this);
74 74
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 CPBrowsingContext context) { 825 CPBrowsingContext context) {
826 // Sadly if we try and pass context through, we seem to break cl's little 826 // Sadly if we try and pass context through, we seem to break cl's little
827 // brain trying to compile the Tuple3 ctor. This cast works. 827 // brain trying to compile the Tuple3 ctor. This cast works.
828 int32 context_as_int32 = static_cast<int32>(context); 828 int32 context_as_int32 = static_cast<int32>(context);
829 // Plugins can only be accessed on the IO thread. 829 // Plugins can only be accessed on the IO thread.
830 BrowserThread::PostTask( 830 BrowserThread::PostTask(
831 BrowserThread::IO, FROM_HERE, 831 BrowserThread::IO, FROM_HERE,
832 NewRunnableFunction(PluginCommandHandler::HandleCommand, 832 NewRunnableFunction(PluginCommandHandler::HandleCommand,
833 command, data, context_as_int32)); 833 command, data, context_as_int32));
834 } 834 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_protocols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698