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

Side by Side Diff: chrome/browser/automation/url_request_automation_job.cc

Issue 7397008: Deprecate RegisterProtocolFactory/(Un)RegisterInterceptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indent. Created 9 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_updater_interceptor.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) 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/automation/url_request_automation_job.h" 5 #include "chrome/browser/automation/url_request_automation_job.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/automation/automation_resource_message_filter.h" 10 #include "chrome/browser/automation/automation_resource_message_filter.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 URLRequestAutomationJob::~URLRequestAutomationJob() { 74 URLRequestAutomationJob::~URLRequestAutomationJob() {
75 DVLOG(1) << "URLRequestAutomationJob delete. Count: " << --instance_count_; 75 DVLOG(1) << "URLRequestAutomationJob delete. Count: " << --instance_count_;
76 Cleanup(); 76 Cleanup();
77 } 77 }
78 78
79 bool URLRequestAutomationJob::EnsureProtocolFactoryRegistered() { 79 bool URLRequestAutomationJob::EnsureProtocolFactoryRegistered() {
80 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 80 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
81 81
82 if (!is_protocol_factory_registered_) { 82 if (!is_protocol_factory_registered_) {
83 old_http_factory_ = 83 old_http_factory_ =
84 net::URLRequest::RegisterProtocolFactory( 84 net::URLRequest::Deprecated::RegisterProtocolFactory(
85 "http", &URLRequestAutomationJob::Factory); 85 "http", &URLRequestAutomationJob::Factory);
86 old_https_factory_ = 86 old_https_factory_ =
87 net::URLRequest::RegisterProtocolFactory( 87 net::URLRequest::Deprecated::RegisterProtocolFactory(
88 "https", &URLRequestAutomationJob::Factory); 88 "https", &URLRequestAutomationJob::Factory);
89 is_protocol_factory_registered_ = true; 89 is_protocol_factory_registered_ = true;
90 } 90 }
91 91
92 return true; 92 return true;
93 } 93 }
94 94
95 net::URLRequestJob* URLRequestAutomationJob::Factory( 95 net::URLRequestJob* URLRequestAutomationJob::Factory(
96 net::URLRequest* request, 96 net::URLRequest* request,
97 const std::string& scheme) { 97 const std::string& scheme) {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (!is_done()) { 482 if (!is_done()) {
483 NotifyDone(request_status_); 483 NotifyDone(request_status_);
484 } 484 }
485 // Reset any pending reads. 485 // Reset any pending reads.
486 if (pending_buf_) { 486 if (pending_buf_) {
487 pending_buf_ = NULL; 487 pending_buf_ = NULL;
488 pending_buf_size_ = 0; 488 pending_buf_size_ = 0;
489 NotifyReadComplete(0); 489 NotifyReadComplete(0);
490 } 490 }
491 } 491 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/component_updater/component_updater_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698