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

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

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include nit Created 7 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/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/content_settings/cookie_settings.h" 8 #include "chrome/browser/content_settings/cookie_settings.h"
9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
10 #include "chrome/browser/prefs/scoped_user_pref_update.h" 10 #include "chrome/browser/prefs/scoped_user_pref_update.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 SetCookieSettingsForTesting(cookie_settings); 81 SetCookieSettingsForTesting(cookie_settings);
82 } 82 }
83 83
84 virtual ~TestProfileIOData() { 84 virtual ~TestProfileIOData() {
85 signin_names()->ReleaseResourcesOnUIThread(); 85 signin_names()->ReleaseResourcesOnUIThread();
86 } 86 }
87 87
88 // ProfileIOData overrides: 88 // ProfileIOData overrides:
89 virtual void InitializeInternal( 89 virtual void InitializeInternal(
90 ProfileParams* profile_params, 90 ProfileParams* profile_params,
91 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 91 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
92 blob_protocol_handler,
93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
94 file_system_protocol_handler,
95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
96 developer_protocol_handler,
97 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
98 chrome_protocol_handler,
99 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
100 chrome_devtools_protocol_handler) const OVERRIDE {
101 NOTREACHED(); 92 NOTREACHED();
102 } 93 }
103 virtual void InitializeExtensionsRequestContext( 94 virtual void InitializeExtensionsRequestContext(
104 ProfileParams* profile_params) const OVERRIDE { 95 ProfileParams* profile_params) const OVERRIDE {
105 NOTREACHED(); 96 NOTREACHED();
106 } 97 }
107 virtual ChromeURLRequestContext* InitializeAppRequestContext( 98 virtual ChromeURLRequestContext* InitializeAppRequestContext(
108 ChromeURLRequestContext* main_context, 99 ChromeURLRequestContext* main_context,
109 const StoragePartitionDescriptor& details, 100 const StoragePartitionDescriptor& details,
110 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 101 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
111 protocol_handler_interceptor, 102 protocol_handler_interceptor,
112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 103 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
113 blob_protocol_handler,
114 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
115 file_system_protocol_handler,
116 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
117 developer_protocol_handler,
118 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
119 chrome_protocol_handler,
120 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
121 chrome_devtools_protocol_handler) const OVERRIDE {
122 NOTREACHED(); 104 NOTREACHED();
123 return NULL; 105 return NULL;
124 } 106 }
125 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 107 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
126 ChromeURLRequestContext* original_context, 108 ChromeURLRequestContext* original_context,
127 const StoragePartitionDescriptor& details) const OVERRIDE { 109 const StoragePartitionDescriptor& details) const OVERRIDE {
128 NOTREACHED(); 110 NOTREACHED();
129 return NULL; 111 return NULL;
130 } 112 }
131 virtual ChromeURLRequestContext* 113 virtual ChromeURLRequestContext*
132 AcquireMediaRequestContext() const OVERRIDE { 114 AcquireMediaRequestContext() const OVERRIDE {
133 NOTREACHED(); 115 NOTREACHED();
134 return NULL; 116 return NULL;
135 } 117 }
136 virtual ChromeURLRequestContext* 118 virtual ChromeURLRequestContext*
137 AcquireIsolatedAppRequestContext( 119 AcquireIsolatedAppRequestContext(
138 ChromeURLRequestContext* main_context, 120 ChromeURLRequestContext* main_context,
139 const StoragePartitionDescriptor& partition_descriptor, 121 const StoragePartitionDescriptor& partition_descriptor,
140 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 122 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
141 protocol_handler_interceptor, 123 protocol_handler_interceptor,
142 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 124 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
143 blob_protocol_handler,
144 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
145 file_system_protocol_handler,
146 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
147 developer_protocol_handler,
148 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
149 chrome_protocol_handler,
150 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
151 chrome_devtools_protocol_handler) const OVERRIDE {
152 NOTREACHED(); 125 NOTREACHED();
153 return NULL; 126 return NULL;
154 } 127 }
155 virtual ChromeURLRequestContext* 128 virtual ChromeURLRequestContext*
156 AcquireIsolatedMediaRequestContext( 129 AcquireIsolatedMediaRequestContext(
157 ChromeURLRequestContext* app_context, 130 ChromeURLRequestContext* app_context,
158 const StoragePartitionDescriptor& partition_descriptor) 131 const StoragePartitionDescriptor& partition_descriptor)
159 const OVERRIDE { 132 const OVERRIDE {
160 NOTREACHED(); 133 NOTREACHED();
161 return NULL; 134 return NULL;
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 valid_gaia_url_, "", &request_, io_data.get())); 759 valid_gaia_url_, "", &request_, io_data.get()));
787 760
788 // Simulate a policy disabling sync by writing kSyncManaged directly. 761 // Simulate a policy disabling sync by writing kSyncManaged directly.
789 // We should still offer to sign in the browser. 762 // We should still offer to sign in the browser.
790 profile_->GetTestingPrefService()->SetManagedPref( 763 profile_->GetTestingPrefService()->SetManagedPref(
791 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 764 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
792 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 765 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
793 OneClickSigninHelper::CanOfferOnIOThreadImpl( 766 OneClickSigninHelper::CanOfferOnIOThreadImpl(
794 valid_gaia_url_, "", &request_, io_data.get())); 767 valid_gaia_url_, "", &request_, io_data.get()));
795 } 768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698