| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 typedef std::vector<AutofillChange> AutofillChangeList; | 50 typedef std::vector<AutofillChange> AutofillChangeList; |
| 51 | 51 |
| 52 static const int kWebDataServiceTimeoutSeconds = 8; | 52 static const int kWebDataServiceTimeoutSeconds = 8; |
| 53 | 53 |
| 54 ACTION_P(SignalEvent, event) { | 54 ACTION_P(SignalEvent, event) { |
| 55 event->Signal(); | 55 event->Signal(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 class AutofillDBThreadObserverHelper : public DBThreadObserverHelper { | 58 class AutofillDBThreadObserverHelper : public DBThreadObserverHelper { |
| 59 protected: | 59 protected: |
| 60 virtual ~AutofillDBThreadObserverHelper() {} |
| 61 |
| 60 virtual void RegisterObservers() { | 62 virtual void RegisterObservers() { |
| 61 registrar_.Add(&observer_, | 63 registrar_.Add(&observer_, |
| 62 chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED, | 64 chrome::NOTIFICATION_AUTOFILL_ENTRIES_CHANGED, |
| 63 content::NotificationService::AllSources()); | 65 content::NotificationService::AllSources()); |
| 64 registrar_.Add(&observer_, | 66 registrar_.Add(&observer_, |
| 65 chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED, | 67 chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED, |
| 66 content::NotificationService::AllSources()); | 68 content::NotificationService::AllSources()); |
| 67 registrar_.Add(&observer_, | 69 registrar_.Add(&observer_, |
| 68 chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED, | 70 chrome::NOTIFICATION_AUTOFILL_CREDIT_CARD_CHANGED, |
| 69 content::NotificationService::AllSources()); | 71 content::NotificationService::AllSources()); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 #endif // defined(ENABLE_WEB_INTENTS) | 792 #endif // defined(ENABLE_WEB_INTENTS) |
| 791 | 793 |
| 792 TEST_F(WebDataServiceTest, DidDefaultSearchProviderChangeOnNewProfile) { | 794 TEST_F(WebDataServiceTest, DidDefaultSearchProviderChangeOnNewProfile) { |
| 793 KeywordsConsumer consumer; | 795 KeywordsConsumer consumer; |
| 794 wds_->GetKeywords(&consumer); | 796 wds_->GetKeywords(&consumer); |
| 795 WaitUntilCalled(); | 797 WaitUntilCalled(); |
| 796 ASSERT_TRUE(consumer.load_succeeded); | 798 ASSERT_TRUE(consumer.load_succeeded); |
| 797 EXPECT_FALSE(consumer.keywords_result.did_default_search_provider_change); | 799 EXPECT_FALSE(consumer.keywords_result.did_default_search_provider_change); |
| 798 EXPECT_FALSE(consumer.keywords_result.backup_valid); | 800 EXPECT_FALSE(consumer.keywords_result.backup_valid); |
| 799 } | 801 } |
| OLD | NEW |