Chromium Code Reviews| 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_registry_syncable.h" | |
|
Mattias Nissler (ping if slow)
2013/02/06 17:53:33
needed?
Jói
2013/02/07 14:52:32
Done.
| |
| 9 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/prefs/pref_service_syncable.h" | |
| 11 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 11 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_info_cache.h" | 13 #include "chrome/browser/profiles/profile_info_cache.h" |
| 14 #include "chrome/browser/profiles/profile_io_data.h" | 14 #include "chrome/browser/profiles/profile_io_data.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/browser/signin/signin_manager_factory.h" | 16 #include "chrome/browser/signin/signin_manager_factory.h" |
| 17 #include "chrome/browser/signin/signin_manager_fake.h" | 17 #include "chrome/browser/signin/signin_manager_fake.h" |
| 18 #include "chrome/browser/signin/signin_names_io_thread.h" | 18 #include "chrome/browser/signin/signin_names_io_thread.h" |
| 19 #include "chrome/browser/sync/profile_sync_service_factory.h" | 19 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 20 #include "chrome/browser/sync/profile_sync_service_mock.h" | 20 #include "chrome/browser/sync/profile_sync_service_mock.h" |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 691 valid_gaia_url_, "", &request_, io_data.get())); | 691 valid_gaia_url_, "", &request_, io_data.get())); |
| 692 | 692 |
| 693 // Simulate a policy disabling sync by writing kSyncManaged directly. | 693 // Simulate a policy disabling sync by writing kSyncManaged directly. |
| 694 // We should still offer to sign in the browser. | 694 // We should still offer to sign in the browser. |
| 695 profile_->GetTestingPrefService()->SetManagedPref( | 695 profile_->GetTestingPrefService()->SetManagedPref( |
| 696 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); | 696 prefs::kSyncManaged, base::Value::CreateBooleanValue(true)); |
| 697 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, | 697 EXPECT_EQ(OneClickSigninHelper::CAN_OFFER, |
| 698 OneClickSigninHelper::CanOfferOnIOThreadImpl( | 698 OneClickSigninHelper::CanOfferOnIOThreadImpl( |
| 699 valid_gaia_url_, "", &request_, io_data.get())); | 699 valid_gaia_url_, "", &request_, io_data.get())); |
| 700 } | 700 } |
| OLD | NEW |