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 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 alerted_(false), | 89 alerted_(false), |
90 has_run_message_loop_(false), | 90 has_run_message_loop_(false), |
91 browser_(browser), | 91 browser_(browser), |
92 infobar_service_(NULL) { | 92 infobar_service_(NULL) { |
93 PersonalDataManagerFactory::GetForProfile(browser_->profile())-> | 93 PersonalDataManagerFactory::GetForProfile(browser_->profile())-> |
94 SetObserver(this); | 94 SetObserver(this); |
95 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, | 95 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, |
96 content::NotificationService::AllSources()); | 96 content::NotificationService::AllSources()); |
97 } | 97 } |
98 | 98 |
99 ~WindowedPersonalDataManagerObserver() { | 99 virtual ~WindowedPersonalDataManagerObserver() { |
100 if (!infobar_service_) | 100 if (!infobar_service_) |
101 return; | 101 return; |
102 | 102 |
103 InfoBarDelegate* infobar = NULL; | 103 InfoBarDelegate* infobar = NULL; |
104 if (infobar_service_->GetInfoBarCount() > 0 && | 104 if (infobar_service_->GetInfoBarCount() > 0 && |
105 (infobar = infobar_service_->GetInfoBarDelegateAt(0))) { | 105 (infobar = infobar_service_->GetInfoBarDelegateAt(0))) { |
106 infobar_service_->RemoveInfoBar(infobar); | 106 infobar_service_->RemoveInfoBar(infobar); |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 // TODO(isherman): this looks redundant, consider removing. | 1604 // TODO(isherman): this looks redundant, consider removing. |
1605 // DISABLED: http://crbug.com/150084 | 1605 // DISABLED: http://crbug.com/150084 |
1606 IN_PROC_BROWSER_TEST_F(AutofillTest, | 1606 IN_PROC_BROWSER_TEST_F(AutofillTest, |
1607 DISABLED_MergeAggregatedDuplicatedProfiles) { | 1607 DISABLED_MergeAggregatedDuplicatedProfiles) { |
1608 int num_of_profiles = | 1608 int num_of_profiles = |
1609 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1609 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
1610 | 1610 |
1611 ASSERT_GT(num_of_profiles, | 1611 ASSERT_GT(num_of_profiles, |
1612 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 1612 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
1613 } | 1613 } |
OLD | NEW |