| 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/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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 92 blob_protocol_handler, |
| 93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 94 file_system_protocol_handler, | 94 file_system_protocol_handler, |
| 95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 96 developer_protocol_handler, | |
| 97 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 98 chrome_protocol_handler, | 96 chrome_protocol_handler, |
| 99 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 97 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 100 chrome_devtools_protocol_handler) const OVERRIDE { | 98 chrome_devtools_protocol_handler) const OVERRIDE { |
| 101 NOTREACHED(); | 99 NOTREACHED(); |
| 102 } | 100 } |
| 103 virtual void InitializeExtensionsRequestContext( | 101 virtual void InitializeExtensionsRequestContext( |
| 104 ProfileParams* profile_params) const OVERRIDE { | 102 ProfileParams* profile_params) const OVERRIDE { |
| 105 NOTREACHED(); | 103 NOTREACHED(); |
| 106 } | 104 } |
| 107 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 105 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
| 108 ChromeURLRequestContext* main_context, | 106 ChromeURLRequestContext* main_context, |
| 109 const StoragePartitionDescriptor& details, | 107 const StoragePartitionDescriptor& details, |
| 110 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 108 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 111 protocol_handler_interceptor, | 109 protocol_handler_interceptor, |
| 112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 110 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 113 blob_protocol_handler, | 111 blob_protocol_handler, |
| 114 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 115 file_system_protocol_handler, | 113 file_system_protocol_handler, |
| 116 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 114 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 117 developer_protocol_handler, | |
| 118 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 119 chrome_protocol_handler, | 115 chrome_protocol_handler, |
| 120 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 116 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 121 chrome_devtools_protocol_handler) const OVERRIDE { | 117 chrome_devtools_protocol_handler) const OVERRIDE { |
| 122 NOTREACHED(); | 118 NOTREACHED(); |
| 123 return NULL; | 119 return NULL; |
| 124 } | 120 } |
| 125 virtual ChromeURLRequestContext* InitializeMediaRequestContext( | 121 virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
| 126 ChromeURLRequestContext* original_context, | 122 ChromeURLRequestContext* original_context, |
| 127 const StoragePartitionDescriptor& details) const OVERRIDE { | 123 const StoragePartitionDescriptor& details) const OVERRIDE { |
| 128 NOTREACHED(); | 124 NOTREACHED(); |
| 129 return NULL; | 125 return NULL; |
| 130 } | 126 } |
| 131 virtual ChromeURLRequestContext* | 127 virtual ChromeURLRequestContext* |
| 132 AcquireMediaRequestContext() const OVERRIDE { | 128 AcquireMediaRequestContext() const OVERRIDE { |
| 133 NOTREACHED(); | 129 NOTREACHED(); |
| 134 return NULL; | 130 return NULL; |
| 135 } | 131 } |
| 136 virtual ChromeURLRequestContext* | 132 virtual ChromeURLRequestContext* |
| 137 AcquireIsolatedAppRequestContext( | 133 AcquireIsolatedAppRequestContext( |
| 138 ChromeURLRequestContext* main_context, | 134 ChromeURLRequestContext* main_context, |
| 139 const StoragePartitionDescriptor& partition_descriptor, | 135 const StoragePartitionDescriptor& partition_descriptor, |
| 140 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 136 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
| 141 protocol_handler_interceptor, | 137 protocol_handler_interceptor, |
| 142 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 138 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 143 blob_protocol_handler, | 139 blob_protocol_handler, |
| 144 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 140 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 145 file_system_protocol_handler, | 141 file_system_protocol_handler, |
| 146 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 142 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 147 developer_protocol_handler, | |
| 148 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 149 chrome_protocol_handler, | 143 chrome_protocol_handler, |
| 150 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 144 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 151 chrome_devtools_protocol_handler) const OVERRIDE { | 145 chrome_devtools_protocol_handler) const OVERRIDE { |
| 152 NOTREACHED(); | 146 NOTREACHED(); |
| 153 return NULL; | 147 return NULL; |
| 154 } | 148 } |
| 155 virtual ChromeURLRequestContext* | 149 virtual ChromeURLRequestContext* |
| 156 AcquireIsolatedMediaRequestContext( | 150 AcquireIsolatedMediaRequestContext( |
| 157 ChromeURLRequestContext* app_context, | 151 ChromeURLRequestContext* app_context, |
| 158 const StoragePartitionDescriptor& partition_descriptor) | 152 const StoragePartitionDescriptor& partition_descriptor) |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 valid_gaia_url_, "", &request_, io_data.get())); | 780 valid_gaia_url_, "", &request_, io_data.get())); |
| 787 | 781 |
| 788 // Simulate a policy disabling sync by writing kSyncManaged directly. | 782 // Simulate a policy disabling sync by writing kSyncManaged directly. |
| 789 // We should still offer to sign in the browser. | 783 // We should still offer to sign in the browser. |
| 790 profile_->GetTestingPrefService()->SetManagedPref( | 784 profile_->GetTestingPrefService()->SetManagedPref( |
| 791 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); | 785 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); |
| 792 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, | 786 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, |
| 793 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 787 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
| 794 valid_gaia_url_, "", &request_, io_data.get())); | 788 valid_gaia_url_, "", &request_, io_data.get())); |
| 795 } | 789 } |
| OLD | NEW |