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

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

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: most unittests pass Created 7 years, 4 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 virtual ~TestProfileIOData() { 87 virtual ~TestProfileIOData() {
88 signin_names()->ReleaseResourcesOnUIThread(); 88 signin_names()->ReleaseResourcesOnUIThread();
89 } 89 }
90 90
91 // ProfileIOData overrides: 91 // ProfileIOData overrides:
92 virtual void InitializeInternal( 92 virtual void InitializeInternal(
93 ProfileParams* profile_params, 93 ProfileParams* profile_params,
94 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 94 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
95 NOTREACHED(); 95 NOTREACHED();
96 } 96 }
97 virtual void InitializeExtensionsRequestContext(
98 ProfileParams* profile_params) const OVERRIDE {
99 NOTREACHED();
100 }
101 virtual ChromeURLRequestContext* InitializeAppRequestContext( 97 virtual ChromeURLRequestContext* InitializeAppRequestContext(
102 ChromeURLRequestContext* main_context, 98 ChromeURLRequestContext* main_context,
103 const StoragePartitionDescriptor& details, 99 const StoragePartitionDescriptor& details,
104 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 100 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
105 protocol_handler_interceptor, 101 protocol_handler_interceptor,
106 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { 102 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE {
107 NOTREACHED(); 103 NOTREACHED();
108 return NULL; 104 return NULL;
109 } 105 }
110 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 106 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); 814 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true));
819 815
820 // Simulate a policy disabling sync by writing kSyncManaged directly. 816 // Simulate a policy disabling sync by writing kSyncManaged directly.
821 // We should still offer to sign in the browser. 817 // We should still offer to sign in the browser.
822 profile()->GetTestingPrefService()->SetManagedPref( 818 profile()->GetTestingPrefService()->SetManagedPref(
823 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); 819 prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
824 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, 820 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
825 OneClickSigninHelper::CanOfferOnIOThreadImpl( 821 OneClickSigninHelper::CanOfferOnIOThreadImpl(
826 valid_gaia_url_, std::string(), &request_, io_data.get())); 822 valid_gaia_url_, std::string(), &request_, io_data.get()));
827 } 823 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698