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

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

Issue 187223003: Allow content layer to pass ProtocolInterceptors when we create URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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) 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/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/prefs/scoped_user_pref_update.h" 6 #include "base/prefs/scoped_user_pref_update.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/content_settings/cookie_settings.h" 10 #include "chrome/browser/content_settings/cookie_settings.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 SetCookieSettingsForTesting(cookie_settings); 90 SetCookieSettingsForTesting(cookie_settings);
91 } 91 }
92 92
93 virtual ~TestProfileIOData() { 93 virtual ~TestProfileIOData() {
94 signin_names()->ReleaseResourcesOnUIThread(); 94 signin_names()->ReleaseResourcesOnUIThread();
95 } 95 }
96 96
97 // ProfileIOData overrides: 97 // ProfileIOData overrides:
98 virtual void InitializeInternal( 98 virtual void InitializeInternal(
99 ProfileParams* profile_params, 99 ProfileParams* profile_params,
100 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 100 content::ProtocolHandlerMap* protocol_handlers,
101 content::ProtocolHandlerScopedVector protocol_interceptors)
102 const OVERRIDE {
101 NOTREACHED(); 103 NOTREACHED();
102 } 104 }
103 virtual void InitializeExtensionsRequestContext( 105 virtual void InitializeExtensionsRequestContext(
104 ProfileParams* profile_params) const OVERRIDE { 106 ProfileParams* profile_params) const OVERRIDE {
105 NOTREACHED(); 107 NOTREACHED();
106 } 108 }
107 virtual ChromeURLRequestContext* InitializeAppRequestContext( 109 virtual ChromeURLRequestContext* InitializeAppRequestContext(
108 ChromeURLRequestContext* main_context, 110 ChromeURLRequestContext* main_context,
109 const StoragePartitionDescriptor& details, 111 const StoragePartitionDescriptor& details,
110 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 112 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
111 protocol_handler_interceptor, 113 protocol_handler_interceptor,
112 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 114 content::ProtocolHandlerMap* protocol_handlers,
115 content::ProtocolHandlerScopedVector protocol_interceptors)
116 const OVERRIDE {
113 NOTREACHED(); 117 NOTREACHED();
114 return NULL; 118 return NULL;
115 } 119 }
116 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 120 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
117 ChromeURLRequestContext* original_context, 121 ChromeURLRequestContext* original_context,
118 const StoragePartitionDescriptor& details) const OVERRIDE { 122 const StoragePartitionDescriptor& details) const OVERRIDE {
119 NOTREACHED(); 123 NOTREACHED();
120 return NULL; 124 return NULL;
121 } 125 }
122 virtual ChromeURLRequestContext* 126 virtual ChromeURLRequestContext*
123 AcquireMediaRequestContext() const OVERRIDE { 127 AcquireMediaRequestContext() const OVERRIDE {
124 NOTREACHED(); 128 NOTREACHED();
125 return NULL; 129 return NULL;
126 } 130 }
127 virtual ChromeURLRequestContext* 131 virtual ChromeURLRequestContext* AcquireIsolatedAppRequestContext(
128 AcquireIsolatedAppRequestContext( 132 ChromeURLRequestContext* main_context,
129 ChromeURLRequestContext* main_context, 133 const StoragePartitionDescriptor& partition_descriptor,
130 const StoragePartitionDescriptor& partition_descriptor, 134 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
131 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 135 protocol_handler_interceptor,
132 protocol_handler_interceptor, 136 content::ProtocolHandlerMap* protocol_handlers,
133 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 137 content::ProtocolHandlerScopedVector protocol_interceptors)
138 const OVERRIDE {
134 NOTREACHED(); 139 NOTREACHED();
135 return NULL; 140 return NULL;
136 } 141 }
137 virtual ChromeURLRequestContext* 142 virtual ChromeURLRequestContext*
138 AcquireIsolatedMediaRequestContext( 143 AcquireIsolatedMediaRequestContext(
139 ChromeURLRequestContext* app_context, 144 ChromeURLRequestContext* app_context,
140 const StoragePartitionDescriptor& partition_descriptor) 145 const StoragePartitionDescriptor& partition_descriptor)
141 const OVERRIDE { 146 const OVERRIDE {
142 NOTREACHED(); 147 NOTREACHED();
143 return NULL; 148 return NULL;
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); 846 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true));
842 847
843 // Simulate a policy disabling sync by writing kSyncManaged directly. 848 // Simulate a policy disabling sync by writing kSyncManaged directly.
844 // We should still offer to sign in the browser. 849 // We should still offer to sign in the browser.
845 profile()->GetTestingPrefService()->SetManagedPref( 850 profile()->GetTestingPrefService()->SetManagedPref(
846 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 851 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
847 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 852 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
848 OneClickSigninHelper::CanOfferOnIOThreadImpl( 853 OneClickSigninHelper::CanOfferOnIOThreadImpl(
849 valid_gaia_url_, &request_, io_data.get())); 854 valid_gaia_url_, &request_, io_data.get()));
850 } 855 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698