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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.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/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
9 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 10 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/profiles/profile_info_cache.h" | 12 #include "chrome/browser/profiles/profile_info_cache.h" |
12 #include "chrome/browser/profiles/profile_io_data.h" | 13 #include "chrome/browser/profiles/profile_io_data.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/browser/signin/signin_manager_factory.h" | 15 #include "chrome/browser/signin/signin_manager_factory.h" |
15 #include "chrome/browser/signin/signin_manager_fake.h" | 16 #include "chrome/browser/signin/signin_manager_fake.h" |
16 #include "chrome/browser/signin/signin_names_io_thread.h" | 17 #include "chrome/browser/signin/signin_names_io_thread.h" |
17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 18 #include "chrome/browser/sync/profile_sync_service_factory.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 ProfileParams* profile_params) const OVERRIDE { | 87 ProfileParams* profile_params) const OVERRIDE { |
87 NOTREACHED(); | 88 NOTREACHED(); |
88 } | 89 } |
89 virtual void InitializeExtensionsRequestContext( | 90 virtual void InitializeExtensionsRequestContext( |
90 ProfileParams* profile_params) const OVERRIDE { | 91 ProfileParams* profile_params) const OVERRIDE { |
91 NOTREACHED(); | 92 NOTREACHED(); |
92 } | 93 } |
93 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 94 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
94 ChromeURLRequestContext* main_context, | 95 ChromeURLRequestContext* main_context, |
95 const StoragePartitionDescriptor& details, | 96 const StoragePartitionDescriptor& details, |
96 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 97 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
97 protocol_handler_interceptor) const OVERRIDE { | 98 protocol_handler_interceptor) const OVERRIDE { |
98 NOTREACHED(); | 99 NOTREACHED(); |
99 return NULL; | 100 return NULL; |
100 } | 101 } |
101 virtual ChromeURLRequestContext* InitializeMediaRequestContext( | 102 virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
102 ChromeURLRequestContext* original_context, | 103 ChromeURLRequestContext* original_context, |
103 const StoragePartitionDescriptor& details) const OVERRIDE { | 104 const StoragePartitionDescriptor& details) const OVERRIDE { |
104 NOTREACHED(); | 105 NOTREACHED(); |
105 return NULL; | 106 return NULL; |
106 } | 107 } |
107 virtual ChromeURLRequestContext* | 108 virtual ChromeURLRequestContext* |
108 AcquireMediaRequestContext() const OVERRIDE { | 109 AcquireMediaRequestContext() const OVERRIDE { |
109 NOTREACHED(); | 110 NOTREACHED(); |
110 return NULL; | 111 return NULL; |
111 } | 112 } |
112 virtual ChromeURLRequestContext* | 113 virtual ChromeURLRequestContext* |
113 AcquireIsolatedAppRequestContext( | 114 AcquireIsolatedAppRequestContext( |
114 ChromeURLRequestContext* main_context, | 115 ChromeURLRequestContext* main_context, |
115 const StoragePartitionDescriptor& partition_descriptor, | 116 const StoragePartitionDescriptor& partition_descriptor, |
116 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 117 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
117 protocol_handler_interceptor) const OVERRIDE { | 118 protocol_handler_interceptor) const OVERRIDE { |
118 NOTREACHED(); | 119 NOTREACHED(); |
119 return NULL; | 120 return NULL; |
120 } | 121 } |
121 virtual ChromeURLRequestContext* | 122 virtual ChromeURLRequestContext* |
122 AcquireIsolatedMediaRequestContext( | 123 AcquireIsolatedMediaRequestContext( |
123 ChromeURLRequestContext* app_context, | 124 ChromeURLRequestContext* app_context, |
124 const StoragePartitionDescriptor& partition_descriptor) | 125 const StoragePartitionDescriptor& partition_descriptor) |
125 const OVERRIDE { | 126 const OVERRIDE { |
126 NOTREACHED(); | 127 NOTREACHED(); |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 valid_gaia_url_, "", &request_, io_data.get())); | 665 valid_gaia_url_, "", &request_, io_data.get())); |
665 } | 666 } |
666 | 667 |
667 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { | 668 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { |
668 AllowSigninCookies(false); | 669 AllowSigninCookies(false); |
669 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); | 670 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); |
670 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, | 671 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, |
671 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 672 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
672 valid_gaia_url_, "", &request_, io_data.get())); | 673 valid_gaia_url_, "", &request_, io_data.get())); |
673 } | 674 } |
OLD | NEW |