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