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

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: Yet another rebase 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
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/ui/webui/favicon_source.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/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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 SetCookieSettingsForTesting(cookie_settings); 83 SetCookieSettingsForTesting(cookie_settings);
84 } 84 }
85 85
86 virtual ~TestProfileIOData() { 86 virtual ~TestProfileIOData() {
87 signin_names()->ReleaseResourcesOnUIThread(); 87 signin_names()->ReleaseResourcesOnUIThread();
88 } 88 }
89 89
90 // ProfileIOData overrides: 90 // ProfileIOData overrides:
91 virtual void InitializeInternal( 91 virtual void InitializeInternal(
92 ProfileParams* profile_params, 92 ProfileParams* profile_params,
93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 93 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
94 blob_protocol_handler,
95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
96 file_system_protocol_handler,
97 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
98 developer_protocol_handler,
99 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
100 chrome_protocol_handler,
101 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
102 chrome_devtools_protocol_handler) const OVERRIDE {
103 NOTREACHED(); 94 NOTREACHED();
104 } 95 }
105 virtual void InitializeExtensionsRequestContext( 96 virtual void InitializeExtensionsRequestContext(
106 ProfileParams* profile_params) const OVERRIDE { 97 ProfileParams* profile_params) const OVERRIDE {
107 NOTREACHED(); 98 NOTREACHED();
108 } 99 }
109 virtual ChromeURLRequestContext* InitializeAppRequestContext( 100 virtual ChromeURLRequestContext* InitializeAppRequestContext(
110 ChromeURLRequestContext* main_context, 101 ChromeURLRequestContext* main_context,
111 const StoragePartitionDescriptor& details, 102 const StoragePartitionDescriptor& details,
112 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 103 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
113 protocol_handler_interceptor, 104 protocol_handler_interceptor,
114 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 105 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
115 blob_protocol_handler,
116 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
117 file_system_protocol_handler,
118 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
119 developer_protocol_handler,
120 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
121 chrome_protocol_handler,
122 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
123 chrome_devtools_protocol_handler) const OVERRIDE {
124 NOTREACHED(); 106 NOTREACHED();
125 return NULL; 107 return NULL;
126 } 108 }
127 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 109 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
128 ChromeURLRequestContext* original_context, 110 ChromeURLRequestContext* original_context,
129 const StoragePartitionDescriptor& details) const OVERRIDE { 111 const StoragePartitionDescriptor& details) const OVERRIDE {
130 NOTREACHED(); 112 NOTREACHED();
131 return NULL; 113 return NULL;
132 } 114 }
133 virtual ChromeURLRequestContext* 115 virtual ChromeURLRequestContext*
134 AcquireMediaRequestContext() const OVERRIDE { 116 AcquireMediaRequestContext() const OVERRIDE {
135 NOTREACHED(); 117 NOTREACHED();
136 return NULL; 118 return NULL;
137 } 119 }
138 virtual ChromeURLRequestContext* 120 virtual ChromeURLRequestContext*
139 AcquireIsolatedAppRequestContext( 121 AcquireIsolatedAppRequestContext(
140 ChromeURLRequestContext* main_context, 122 ChromeURLRequestContext* main_context,
141 const StoragePartitionDescriptor& partition_descriptor, 123 const StoragePartitionDescriptor& partition_descriptor,
142 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 124 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
143 protocol_handler_interceptor, 125 protocol_handler_interceptor,
144 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 126 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
145 blob_protocol_handler,
146 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
147 file_system_protocol_handler,
148 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
149 developer_protocol_handler,
150 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
151 chrome_protocol_handler,
152 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
153 chrome_devtools_protocol_handler) const OVERRIDE {
154 NOTREACHED(); 127 NOTREACHED();
155 return NULL; 128 return NULL;
156 } 129 }
157 virtual ChromeURLRequestContext* 130 virtual ChromeURLRequestContext*
158 AcquireIsolatedMediaRequestContext( 131 AcquireIsolatedMediaRequestContext(
159 ChromeURLRequestContext* app_context, 132 ChromeURLRequestContext* app_context,
160 const StoragePartitionDescriptor& partition_descriptor) 133 const StoragePartitionDescriptor& partition_descriptor)
161 const OVERRIDE { 134 const OVERRIDE {
162 NOTREACHED(); 135 NOTREACHED();
163 return NULL; 136 return NULL;
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); 818 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true));
846 819
847 // Simulate a policy disabling sync by writing kSyncManaged directly. 820 // Simulate a policy disabling sync by writing kSyncManaged directly.
848 // We should still offer to sign in the browser. 821 // We should still offer to sign in the browser.
849 profile_->GetTestingPrefService()->SetManagedPref( 822 profile_->GetTestingPrefService()->SetManagedPref(
850 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 823 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
851 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 824 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
852 OneClickSigninHelper::CanOfferOnIOThreadImpl( 825 OneClickSigninHelper::CanOfferOnIOThreadImpl(
853 valid_gaia_url_, "", &request_, io_data.get())); 826 valid_gaia_url_, "", &request_, io_data.get()));
854 } 827 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/ui/webui/favicon_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698