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 // This job type handles Chrome plugin network interception. When a plugin | 5 // This job type handles Chrome plugin network interception. When a plugin |
6 // wants to intercept a request, a job of this type is created. The intercept | 6 // wants to intercept a request, a job of this type is created. The intercept |
7 // job communicates with the plugin to retrieve the response headers and data. | 7 // job communicates with the plugin to retrieve the response headers and data. |
8 | 8 |
9 #include "chrome/common/net/url_request_intercept_job.h" | 9 #include "chrome/common/net/url_request_intercept_job.h" |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
16 #include "chrome/common/chrome_plugin_lib.h" | 16 #include "chrome/common/chrome_plugin_lib.h" |
17 #include "chrome/common/notification_source.h" | 17 #include "content/common/notification_source.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 #include "net/base/x509_certificate.h" | 20 #include "net/base/x509_certificate.h" |
21 #include "net/http/http_response_headers.h" | 21 #include "net/http/http_response_headers.h" |
22 #include "net/url_request/url_request.h" | 22 #include "net/url_request/url_request.h" |
23 | 23 |
24 using base::Time; | 24 using base::Time; |
25 using base::TimeDelta; | 25 using base::TimeDelta; |
26 | 26 |
27 // | 27 // |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 NotifyReadComplete(bytes_read); | 229 NotifyReadComplete(bytes_read); |
230 } | 230 } |
231 | 231 |
232 void URLRequestInterceptJob::Observe(NotificationType type, | 232 void URLRequestInterceptJob::Observe(NotificationType type, |
233 const NotificationSource& source, | 233 const NotificationSource& source, |
234 const NotificationDetails& details) { | 234 const NotificationDetails& details) { |
235 DCHECK(type == NotificationType::CHROME_PLUGIN_UNLOADED); | 235 DCHECK(type == NotificationType::CHROME_PLUGIN_UNLOADED); |
236 DCHECK(plugin_ == Source<ChromePluginLib>(source).ptr()); | 236 DCHECK(plugin_ == Source<ChromePluginLib>(source).ptr()); |
237 DetachPlugin(); | 237 DetachPlugin(); |
238 } | 238 } |
OLD | NEW |