OLD | NEW |
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 Loading... |
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 } | |
104 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 100 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
105 ChromeURLRequestContext* main_context, | 101 ChromeURLRequestContext* main_context, |
106 const StoragePartitionDescriptor& details, | 102 const StoragePartitionDescriptor& details, |
107 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 103 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
108 protocol_handler_interceptor, | 104 protocol_handler_interceptor, |
109 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { | 105 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE { |
110 NOTREACHED(); | 106 NOTREACHED(); |
111 return NULL; | 107 return NULL; |
112 } | 108 } |
113 virtual ChromeURLRequestContext* InitializeMediaRequestContext( | 109 virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); | 849 prefs::kSigninAllowed, base::Value::CreateBooleanValue(true)); |
854 | 850 |
855 // Simulate a policy disabling sync by writing kSyncManaged directly. | 851 // Simulate a policy disabling sync by writing kSyncManaged directly. |
856 // We should still offer to sign in the browser. | 852 // We should still offer to sign in the browser. |
857 profile()->GetTestingPrefService()->SetManagedPref( | 853 profile()->GetTestingPrefService()->SetManagedPref( |
858 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); | 854 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); |
859 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, | 855 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, |
860 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 856 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
861 valid_gaia_url_, std::string(), &request_, io_data.get())); | 857 valid_gaia_url_, std::string(), &request_, io_data.get())); |
862 } | 858 } |
OLD | NEW |