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

Side by Side Diff: chrome_frame/test/net/test_automation_provider.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
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_frame/test/net/test_automation_provider.h" 5 #include "chrome_frame/test/net/test_automation_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_version_info.h" 8 #include "base/file_version_info.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/common/automation_messages.h" 10 #include "chrome/common/automation_messages.h"
(...skipping 17 matching lines...) Expand all
28 28
29 TestAutomationProvider::TestAutomationProvider( 29 TestAutomationProvider::TestAutomationProvider(
30 Profile* profile, 30 Profile* profile,
31 TestAutomationProviderDelegate* delegate) 31 TestAutomationProviderDelegate* delegate)
32 : AutomationProvider(profile), tab_handle_(-1), delegate_(delegate) { 32 : AutomationProvider(profile), tab_handle_(-1), delegate_(delegate) {
33 // We need to register the protocol factory before the 33 // We need to register the protocol factory before the
34 // AutomationResourceMessageFilter registers the automation job factory to 34 // AutomationResourceMessageFilter registers the automation job factory to
35 // ensure that we don't inadvarently end up handling http requests which 35 // ensure that we don't inadvarently end up handling http requests which
36 // we don't expect. The initial chrome frame page for the network tests 36 // we don't expect. The initial chrome frame page for the network tests
37 // issues http requests which our test factory should not handle. 37 // issues http requests which our test factory should not handle.
38 net::URLRequest::RegisterProtocolFactory("http", 38 net::URLRequest::Deprecated::RegisterProtocolFactory(
39 TestAutomationProvider::Factory); 39 "http", TestAutomationProvider::Factory);
40 net::URLRequest::RegisterProtocolFactory("https", 40 net::URLRequest::Deprecated::RegisterProtocolFactory(
41 TestAutomationProvider::Factory); 41 "https", TestAutomationProvider::Factory);
42 automation_resource_message_filter_ = 42 automation_resource_message_filter_ =
43 new TestAutomationResourceMessageFilter(this); 43 new TestAutomationResourceMessageFilter(this);
44 g_provider_instance_ = this; 44 g_provider_instance_ = this;
45 } 45 }
46 46
47 TestAutomationProvider::~TestAutomationProvider() { 47 TestAutomationProvider::~TestAutomationProvider() {
48 g_provider_instance_ = NULL; 48 g_provider_instance_ = NULL;
49 } 49 }
50 50
51 bool TestAutomationProvider::OnMessageReceived(const IPC::Message& msg) { 51 bool TestAutomationProvider::OnMessageReceived(const IPC::Message& msg) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // static 116 // static
117 TestAutomationProvider* TestAutomationProvider::NewAutomationProvider( 117 TestAutomationProvider* TestAutomationProvider::NewAutomationProvider(
118 Profile* p, const std::string& channel, 118 Profile* p, const std::string& channel,
119 TestAutomationProviderDelegate* delegate) { 119 TestAutomationProviderDelegate* delegate) {
120 TestAutomationProvider* automation = new TestAutomationProvider(p, delegate); 120 TestAutomationProvider* automation = new TestAutomationProvider(p, delegate);
121 automation->InitializeChannel(channel); 121 automation->InitializeChannel(channel);
122 automation->SetExpectedTabCount(1); 122 automation->SetExpectedTabCount(1);
123 return automation; 123 return automation;
124 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698