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

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

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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/strings/utf_string_conversions.h" 6 #include "base/strings/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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual ~TestProfileIOData() { 90 virtual ~TestProfileIOData() {
91 signin_names()->ReleaseResourcesOnUIThread(); 91 signin_names()->ReleaseResourcesOnUIThread();
92 } 92 }
93 93
94 // ProfileIOData overrides: 94 // ProfileIOData overrides:
95 virtual void InitializeInternal( 95 virtual void InitializeInternal(
96 ProfileParams* profile_params, 96 ProfileParams* profile_params,
97 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 97 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
98 NOTREACHED(); 98 NOTREACHED();
99 } 99 }
100 virtual void InitializeExtensionsRequestContext(
101 ProfileParams* profile_params) const OVERRIDE {
102 NOTREACHED();
103 }
100 virtual ChromeURLRequestContext* InitializeAppRequestContext( 104 virtual ChromeURLRequestContext* InitializeAppRequestContext(
101 ChromeURLRequestContext* main_context, 105 ChromeURLRequestContext* main_context,
102 const StoragePartitionDescriptor& details, 106 const StoragePartitionDescriptor& details,
103 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 107 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
104 protocol_handler_interceptor, 108 protocol_handler_interceptor,
105 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 109 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
106 NOTREACHED(); 110 NOTREACHED();
107 return NULL; 111 return NULL;
108 } 112 }
109 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 113 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); 869 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true));
866 870
867 // Simulate a policy disabling sync by writing kSyncManaged directly. 871 // Simulate a policy disabling sync by writing kSyncManaged directly.
868 // We should still offer to sign in the browser. 872 // We should still offer to sign in the browser.
869 profile()->GetTestingPrefService()->SetManagedPref( 873 profile()->GetTestingPrefService()->SetManagedPref(
870 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 874 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
871 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 875 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
872 OneClickSigninHelper::CanOfferOnIOThreadImpl( 876 OneClickSigninHelper::CanOfferOnIOThreadImpl(
873 valid_gaia_url_, std::string(), &request_, io_data.get())); 877 valid_gaia_url_, std::string(), &request_, io_data.get()));
874 } 878 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698