Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 2521001: AutoFill: Make PersonalDataManager RefCountedThreadSafe. (Closed)
Patch Set: Fix lints. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/personal_data_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager_unittest.cc
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index a54b04d8f1305c93d133eada07b7a671b059d6b8..e8ecac31b454e11a719970c4a62cd6a2b0f2e8b7 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -4,6 +4,7 @@
#include <vector>
+#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/scoped_vector.h"
#include "base/string16.h"
@@ -87,17 +88,19 @@ class TestPersonalDataManager : public PersonalDataManager {
class TestAutoFillManager : public AutoFillManager {
public:
explicit TestAutoFillManager(TabContents* tab_contents)
- : AutoFillManager(tab_contents, &test_personal_data_) {
+ : AutoFillManager(tab_contents, NULL) {
+ test_personal_data_ = new TestPersonalDataManager();
+ set_personal_data_manager(test_personal_data_.get());
}
virtual bool IsAutoFillEnabled() const { return true; }
AutoFillProfile* GetLabeledProfile(const char* label) {
- return test_personal_data_.GetLabeledProfile(label);
+ return test_personal_data_->GetLabeledProfile(label);
}
private:
- TestPersonalDataManager test_personal_data_;
+ scoped_refptr<TestPersonalDataManager> test_personal_data_;
DISALLOW_COPY_AND_ASSIGN(TestAutoFillManager);
};
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/personal_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698