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

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: sync (r181485) Created 7 years, 10 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 | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/test/base/testing_profile.h » ('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) 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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/prefs/pref_service_syncable.h" 10 #include "chrome/browser/prefs/pref_service_syncable.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 set_signin_names_for_testing(new SigninNamesOnIOThread()); 79 set_signin_names_for_testing(new SigninNamesOnIOThread());
80 SetCookieSettingsForTesting(cookie_settings); 80 SetCookieSettingsForTesting(cookie_settings);
81 } 81 }
82 82
83 virtual ~TestProfileIOData() { 83 virtual ~TestProfileIOData() {
84 signin_names()->ReleaseResourcesOnUIThread(); 84 signin_names()->ReleaseResourcesOnUIThread();
85 } 85 }
86 86
87 // ProfileIOData overrides: 87 // ProfileIOData overrides:
88 virtual void LazyInitializeInternal( 88 virtual void InitializeInternal(
89 ProfileParams* profile_params) const OVERRIDE { 89 ProfileParams* profile_params,
90 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
91 blob_protocol_handler,
92 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
93 file_system_protocol_handler,
94 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
95 developer_protocol_handler,
96 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
97 chrome_protocol_handler,
98 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
99 chrome_devtools_protocol_handler) const OVERRIDE {
90 NOTREACHED(); 100 NOTREACHED();
91 } 101 }
92 virtual void InitializeExtensionsRequestContext( 102 virtual void InitializeExtensionsRequestContext(
93 ProfileParams* profile_params) const OVERRIDE { 103 ProfileParams* profile_params) const OVERRIDE {
94 NOTREACHED(); 104 NOTREACHED();
95 } 105 }
96 virtual ChromeURLRequestContext* InitializeAppRequestContext( 106 virtual ChromeURLRequestContext* InitializeAppRequestContext(
97 ChromeURLRequestContext* main_context, 107 ChromeURLRequestContext* main_context,
98 const StoragePartitionDescriptor& details, 108 const StoragePartitionDescriptor& details,
99 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 109 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
100 protocol_handler_interceptor) const OVERRIDE { 110 protocol_handler_interceptor,
111 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
112 blob_protocol_handler,
113 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
114 file_system_protocol_handler,
115 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
116 developer_protocol_handler,
117 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
118 chrome_protocol_handler,
119 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
120 chrome_devtools_protocol_handler) const OVERRIDE {
101 NOTREACHED(); 121 NOTREACHED();
102 return NULL; 122 return NULL;
103 } 123 }
104 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 124 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
105 ChromeURLRequestContext* original_context, 125 ChromeURLRequestContext* original_context,
106 const StoragePartitionDescriptor& details) const OVERRIDE { 126 const StoragePartitionDescriptor& details) const OVERRIDE {
107 NOTREACHED(); 127 NOTREACHED();
108 return NULL; 128 return NULL;
109 } 129 }
110 virtual ChromeURLRequestContext* 130 virtual ChromeURLRequestContext*
111 AcquireMediaRequestContext() const OVERRIDE { 131 AcquireMediaRequestContext() const OVERRIDE {
112 NOTREACHED(); 132 NOTREACHED();
113 return NULL; 133 return NULL;
114 } 134 }
115 virtual ChromeURLRequestContext* 135 virtual ChromeURLRequestContext*
116 AcquireIsolatedAppRequestContext( 136 AcquireIsolatedAppRequestContext(
117 ChromeURLRequestContext* main_context, 137 ChromeURLRequestContext* main_context,
118 const StoragePartitionDescriptor& partition_descriptor, 138 const StoragePartitionDescriptor& partition_descriptor,
119 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 139 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
120 protocol_handler_interceptor) const OVERRIDE { 140 protocol_handler_interceptor,
141 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
142 blob_protocol_handler,
143 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
144 file_system_protocol_handler,
145 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
146 developer_protocol_handler,
147 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
148 chrome_protocol_handler,
149 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
150 chrome_devtools_protocol_handler) const OVERRIDE {
121 NOTREACHED(); 151 NOTREACHED();
122 return NULL; 152 return NULL;
123 } 153 }
124 virtual ChromeURLRequestContext* 154 virtual ChromeURLRequestContext*
125 AcquireIsolatedMediaRequestContext( 155 AcquireIsolatedMediaRequestContext(
126 ChromeURLRequestContext* app_context, 156 ChromeURLRequestContext* app_context,
127 const StoragePartitionDescriptor& partition_descriptor) 157 const StoragePartitionDescriptor& partition_descriptor)
128 const OVERRIDE { 158 const OVERRIDE {
129 NOTREACHED(); 159 NOTREACHED();
130 return NULL; 160 return NULL;
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 valid_gaia_url_, "", &request_, io_data.get())); 772 valid_gaia_url_, "", &request_, io_data.get()));
743 773
744 // Simulate a policy disabling sync by writing kSyncManaged directly. 774 // Simulate a policy disabling sync by writing kSyncManaged directly.
745 // We should still offer to sign in the browser. 775 // We should still offer to sign in the browser.
746 profile_->GetTestingPrefService()->SetManagedPref( 776 profile_->GetTestingPrefService()->SetManagedPref(
747 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 777 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
748 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 778 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
749 OneClickSigninHelper::CanOfferOnIOThreadImpl( 779 OneClickSigninHelper::CanOfferOnIOThreadImpl(
750 valid_gaia_url_, "", &request_, io_data.get())); 780 valid_gaia_url_, "", &request_, io_data.get()));
751 } 781 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/test/base/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698