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

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: Address Charlie's comments. 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
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, 92 developer_protocol_handler,
97 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 93 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
98 chrome_protocol_handler,
99 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
100 chrome_devtools_protocol_handler) const OVERRIDE {
101 NOTREACHED(); 94 NOTREACHED();
102 } 95 }
103 virtual void InitializeExtensionsRequestContext( 96 virtual void InitializeExtensionsRequestContext(
104 ProfileParams* profile_params) const OVERRIDE { 97 ProfileParams* profile_params) const OVERRIDE {
105 NOTREACHED(); 98 NOTREACHED();
106 } 99 }
107 virtual ChromeURLRequestContext* InitializeAppRequestContext( 100 virtual ChromeURLRequestContext* InitializeAppRequestContext(
108 ChromeURLRequestContext* main_context, 101 ChromeURLRequestContext* main_context,
109 const StoragePartitionDescriptor& details, 102 const StoragePartitionDescriptor& details,
110 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 103 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
111 protocol_handler_interceptor, 104 protocol_handler_interceptor,
112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 105 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
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, 106 developer_protocol_handler,
118 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 107 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
119 chrome_protocol_handler,
120 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
121 chrome_devtools_protocol_handler) const OVERRIDE {
122 NOTREACHED(); 108 NOTREACHED();
123 return NULL; 109 return NULL;
124 } 110 }
125 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 111 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
126 ChromeURLRequestContext* original_context, 112 ChromeURLRequestContext* original_context,
127 const StoragePartitionDescriptor& details) const OVERRIDE { 113 const StoragePartitionDescriptor& details) const OVERRIDE {
128 NOTREACHED(); 114 NOTREACHED();
129 return NULL; 115 return NULL;
130 } 116 }
131 virtual ChromeURLRequestContext* 117 virtual ChromeURLRequestContext*
132 AcquireMediaRequestContext() const OVERRIDE { 118 AcquireMediaRequestContext() const OVERRIDE {
133 NOTREACHED(); 119 NOTREACHED();
134 return NULL; 120 return NULL;
135 } 121 }
136 virtual ChromeURLRequestContext* 122 virtual ChromeURLRequestContext*
137 AcquireIsolatedAppRequestContext( 123 AcquireIsolatedAppRequestContext(
138 ChromeURLRequestContext* main_context, 124 ChromeURLRequestContext* main_context,
139 const StoragePartitionDescriptor& partition_descriptor, 125 const StoragePartitionDescriptor& partition_descriptor,
140 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 126 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
141 protocol_handler_interceptor, 127 protocol_handler_interceptor,
142 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 128 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
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, 129 developer_protocol_handler,
148 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 130 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
149 chrome_protocol_handler,
150 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
151 chrome_devtools_protocol_handler) const OVERRIDE {
152 NOTREACHED(); 131 NOTREACHED();
153 return NULL; 132 return NULL;
154 } 133 }
155 virtual ChromeURLRequestContext* 134 virtual ChromeURLRequestContext*
156 AcquireIsolatedMediaRequestContext( 135 AcquireIsolatedMediaRequestContext(
157 ChromeURLRequestContext* app_context, 136 ChromeURLRequestContext* app_context,
158 const StoragePartitionDescriptor& partition_descriptor) 137 const StoragePartitionDescriptor& partition_descriptor)
159 const OVERRIDE { 138 const OVERRIDE {
160 NOTREACHED(); 139 NOTREACHED();
161 return NULL; 140 return NULL;
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 valid_gaia_url_, "", &request_, io_data.get())); 765 valid_gaia_url_, "", &request_, io_data.get()));
787 766
788 // Simulate a policy disabling sync by writing kSyncManaged directly. 767 // Simulate a policy disabling sync by writing kSyncManaged directly.
789 // We should still offer to sign in the browser. 768 // We should still offer to sign in the browser.
790 profile_->GetTestingPrefService()->SetManagedPref( 769 profile_->GetTestingPrefService()->SetManagedPref(
791 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 770 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
792 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 771 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
793 OneClickSigninHelper::CanOfferOnIOThreadImpl( 772 OneClickSigninHelper::CanOfferOnIOThreadImpl(
794 valid_gaia_url_, "", &request_, io_data.get())); 773 valid_gaia_url_, "", &request_, io_data.get()));
795 } 774 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698