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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "base/values.h" | 6 #include "base/values.h" |
7 #include "chrome/browser/content_settings/cookie_settings.h" | 7 #include "chrome/browser/content_settings/cookie_settings.h" |
8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/prefs/pref_service_syncable.h" | 10 #include "chrome/browser/prefs/pref_service_syncable.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 set_signin_names_for_testing(new SigninNamesOnIOThread()); | 76 set_signin_names_for_testing(new SigninNamesOnIOThread()); |
77 SetCookieSettingsForTesting(cookie_settings); | 77 SetCookieSettingsForTesting(cookie_settings); |
78 } | 78 } |
79 | 79 |
80 virtual ~TestProfileIOData() { | 80 virtual ~TestProfileIOData() { |
81 signin_names()->ReleaseResourcesOnUIThread(); | 81 signin_names()->ReleaseResourcesOnUIThread(); |
82 } | 82 } |
83 | 83 |
84 // ProfileIOData overrides: | 84 // ProfileIOData overrides: |
85 virtual void LazyInitializeInternal( | 85 virtual void InitializeInternal( |
86 ProfileParams* profile_params) const OVERRIDE { | 86 ProfileParams* profile_params, |
| 87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 88 blob_protocol_handler, |
| 89 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 90 file_system_protocol_handler, |
| 91 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 92 developer_protocol_handler, |
| 93 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 94 chrome_protocol_handler, |
| 95 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 96 chrome_devtools_protocol_handler) const OVERRIDE { |
87 NOTREACHED(); | 97 NOTREACHED(); |
88 } | 98 } |
89 virtual void InitializeExtensionsRequestContext( | 99 virtual void InitializeExtensionsRequestContext( |
90 ProfileParams* profile_params) const OVERRIDE { | 100 ProfileParams* profile_params) const OVERRIDE { |
91 NOTREACHED(); | 101 NOTREACHED(); |
92 } | 102 } |
93 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 103 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
94 ChromeURLRequestContext* main_context, | 104 ChromeURLRequestContext* main_context, |
95 const StoragePartitionDescriptor& details, | 105 const StoragePartitionDescriptor& details, |
96 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 106 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
97 protocol_handler_interceptor) const OVERRIDE { | 107 protocol_handler_interceptor, |
| 108 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 109 blob_protocol_handler, |
| 110 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 111 file_system_protocol_handler, |
| 112 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 113 developer_protocol_handler, |
| 114 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 115 chrome_protocol_handler, |
| 116 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 117 chrome_devtools_protocol_handler) const OVERRIDE { |
98 NOTREACHED(); | 118 NOTREACHED(); |
99 return NULL; | 119 return NULL; |
100 } | 120 } |
101 virtual ChromeURLRequestContext* InitializeMediaRequestContext( | 121 virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
102 ChromeURLRequestContext* original_context, | 122 ChromeURLRequestContext* original_context, |
103 const StoragePartitionDescriptor& details) const OVERRIDE { | 123 const StoragePartitionDescriptor& details) const OVERRIDE { |
104 NOTREACHED(); | 124 NOTREACHED(); |
105 return NULL; | 125 return NULL; |
106 } | 126 } |
107 virtual ChromeURLRequestContext* | 127 virtual ChromeURLRequestContext* |
108 AcquireMediaRequestContext() const OVERRIDE { | 128 AcquireMediaRequestContext() const OVERRIDE { |
109 NOTREACHED(); | 129 NOTREACHED(); |
110 return NULL; | 130 return NULL; |
111 } | 131 } |
112 virtual ChromeURLRequestContext* | 132 virtual ChromeURLRequestContext* |
113 AcquireIsolatedAppRequestContext( | 133 AcquireIsolatedAppRequestContext( |
114 ChromeURLRequestContext* main_context, | 134 ChromeURLRequestContext* main_context, |
115 const StoragePartitionDescriptor& partition_descriptor, | 135 const StoragePartitionDescriptor& partition_descriptor, |
116 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 136 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
117 protocol_handler_interceptor) const OVERRIDE { | 137 protocol_handler_interceptor, |
| 138 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 139 blob_protocol_handler, |
| 140 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 141 file_system_protocol_handler, |
| 142 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 143 developer_protocol_handler, |
| 144 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 145 chrome_protocol_handler, |
| 146 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 147 chrome_devtools_protocol_handler) const OVERRIDE { |
118 NOTREACHED(); | 148 NOTREACHED(); |
119 return NULL; | 149 return NULL; |
120 } | 150 } |
121 virtual ChromeURLRequestContext* | 151 virtual ChromeURLRequestContext* |
122 AcquireIsolatedMediaRequestContext( | 152 AcquireIsolatedMediaRequestContext( |
123 ChromeURLRequestContext* app_context, | 153 ChromeURLRequestContext* app_context, |
124 const StoragePartitionDescriptor& partition_descriptor) | 154 const StoragePartitionDescriptor& partition_descriptor) |
125 const OVERRIDE { | 155 const OVERRIDE { |
126 NOTREACHED(); | 156 NOTREACHED(); |
127 return NULL; | 157 return NULL; |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 719 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
690 valid_gaia_url_, "", &request_, io_data.get())); | 720 valid_gaia_url_, "", &request_, io_data.get())); |
691 | 721 |
692 // Simulate a policy disabling sync by writing kSyncManaged directly. | 722 // Simulate a policy disabling sync by writing kSyncManaged directly. |
693 profile_->GetTestingPrefService()->SetManagedPref( | 723 profile_->GetTestingPrefService()->SetManagedPref( |
694 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); | 724 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); |
695 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, | 725 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, |
696 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 726 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
697 valid_gaia_url_, "", &request_, io_data.get())); | 727 valid_gaia_url_, "", &request_, io_data.get())); |
698 } | 728 } |
OLD | NEW |