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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove incorrect comment Created 8 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
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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/prefs/scoped_user_pref_update.h" 9 #include "chrome/browser/prefs/scoped_user_pref_update.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 set_signin_names_for_testing(new SigninNamesOnIOThread()); 76 set_signin_names_for_testing(new SigninNamesOnIOThread());
77 SetCookieSettingsForTesting(cookie_settings); 77 SetCookieSettingsForTesting(cookie_settings);
78 } 78 }
79 79
80 virtual ~TestProfileIOData() { 80 virtual ~TestProfileIOData() {
81 signin_names()->ReleaseResourcesOnUIThread(); 81 signin_names()->ReleaseResourcesOnUIThread();
82 } 82 }
83 83
84 // ProfileIOData overrides: 84 // ProfileIOData overrides:
85 virtual void LazyInitializeInternal( 85 virtual void LazyInitializeInternal(
86 ProfileParams* profile_params) const OVERRIDE { 86 ProfileParams* profile_params,
87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
88 blob_protocol_handler,
89 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
90 file_system_protocol_handler,
91 scoped_ptr<net::URLRequestJobFactory::Interceptor>
92 developer_protocol_handler) const OVERRIDE {
87 NOTREACHED(); 93 NOTREACHED();
88 } 94 }
89 virtual void InitializeExtensionsRequestContext( 95 virtual void InitializeExtensionsRequestContext(
90 ProfileParams* profile_params) const OVERRIDE { 96 ProfileParams* profile_params) const OVERRIDE {
91 NOTREACHED(); 97 NOTREACHED();
92 } 98 }
93 virtual ChromeURLRequestContext* InitializeAppRequestContext( 99 virtual ChromeURLRequestContext* InitializeAppRequestContext(
94 ChromeURLRequestContext* main_context, 100 ChromeURLRequestContext* main_context,
95 const StoragePartitionDescriptor& details, 101 const StoragePartitionDescriptor& details,
96 scoped_ptr<net::URLRequestJobFactory::Interceptor> 102 scoped_ptr<net::URLRequestJobFactory::Interceptor>
97 protocol_handler_interceptor) const OVERRIDE { 103 protocol_handler_interceptor,
104 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
105 blob_protocol_handler,
106 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
107 file_system_protocol_handler,
108 scoped_ptr<net::URLRequestJobFactory::Interceptor>
109 developer_protocol_handler) const OVERRIDE {
98 NOTREACHED(); 110 NOTREACHED();
99 return NULL; 111 return NULL;
100 } 112 }
101 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 113 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
102 ChromeURLRequestContext* original_context, 114 ChromeURLRequestContext* original_context,
103 const StoragePartitionDescriptor& details) const OVERRIDE { 115 const StoragePartitionDescriptor& details) const OVERRIDE {
104 NOTREACHED(); 116 NOTREACHED();
105 return NULL; 117 return NULL;
106 } 118 }
107 virtual ChromeURLRequestContext* 119 virtual ChromeURLRequestContext*
108 AcquireMediaRequestContext() const OVERRIDE { 120 AcquireMediaRequestContext() const OVERRIDE {
109 NOTREACHED(); 121 NOTREACHED();
110 return NULL; 122 return NULL;
111 } 123 }
112 virtual ChromeURLRequestContext* 124 virtual ChromeURLRequestContext*
113 AcquireIsolatedAppRequestContext( 125 AcquireIsolatedAppRequestContext(
114 ChromeURLRequestContext* main_context, 126 ChromeURLRequestContext* main_context,
115 const StoragePartitionDescriptor& partition_descriptor, 127 const StoragePartitionDescriptor& partition_descriptor,
116 scoped_ptr<net::URLRequestJobFactory::Interceptor> 128 scoped_ptr<net::URLRequestJobFactory::Interceptor>
117 protocol_handler_interceptor) const OVERRIDE { 129 protocol_handler_interceptor,
130 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
131 blob_protocol_handler,
132 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
133 file_system_protocol_handler,
134 scoped_ptr<net::URLRequestJobFactory::Interceptor>
135 developer_protocol_handler) const OVERRIDE {
118 NOTREACHED(); 136 NOTREACHED();
119 return NULL; 137 return NULL;
120 } 138 }
121 virtual ChromeURLRequestContext* 139 virtual ChromeURLRequestContext*
122 AcquireIsolatedMediaRequestContext( 140 AcquireIsolatedMediaRequestContext(
123 ChromeURLRequestContext* app_context, 141 ChromeURLRequestContext* app_context,
124 const StoragePartitionDescriptor& partition_descriptor) 142 const StoragePartitionDescriptor& partition_descriptor)
125 const OVERRIDE { 143 const OVERRIDE {
126 NOTREACHED(); 144 NOTREACHED();
127 return NULL; 145 return NULL;
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 valid_gaia_url_, "", &request_, io_data.get())); 667 valid_gaia_url_, "", &request_, io_data.get()));
650 } 668 }
651 669
652 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { 670 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) {
653 AllowSigninCookies(false); 671 AllowSigninCookies(false);
654 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); 672 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false));
655 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, 673 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER,
656 OneClickSigninHelper::CanOfferOnIOThreadImpl( 674 OneClickSigninHelper::CanOfferOnIOThreadImpl(
657 valid_gaia_url_, "", &request_, io_data.get())); 675 valid_gaia_url_, "", &request_, io_data.get()));
658 } 676 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698