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

Side by Side Diff: chrome/browser/autofill/autofill_metrics_unittest.cc

Issue 11761016: Separate WebDataRequest functionality from WebDataService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Break autofill deps (and cleanup) Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void SetBrowserContext(content::BrowserContext* context) { 89 void SetBrowserContext(content::BrowserContext* context) {
90 set_browser_context(context); 90 set_browser_context(context);
91 } 91 }
92 92
93 // Overridden to avoid a trip to the database. This should be a no-op except 93 // Overridden to avoid a trip to the database. This should be a no-op except
94 // for the side-effect of logging the profile count. 94 // for the side-effect of logging the profile count.
95 virtual void LoadProfiles() OVERRIDE { 95 virtual void LoadProfiles() OVERRIDE {
96 std::vector<AutofillProfile*> profiles; 96 std::vector<AutofillProfile*> profiles;
97 web_profiles_.release(&profiles); 97 web_profiles_.release(&profiles);
98 WDResult<std::vector<AutofillProfile*> > result(AUTOFILL_PROFILES_RESULT, 98 WDResult<std::vector<AutofillProfile*> > result(AUTOFILL_PROFILES_RESULT,
99 DestroyCallback(),
99 profiles); 100 profiles);
100 ReceiveLoadedProfiles(0, &result); 101 ReceiveLoadedProfiles(0, &result);
101 } 102 }
102 103
103 // Overridden to avoid a trip to the database. 104 // Overridden to avoid a trip to the database.
104 virtual void LoadCreditCards() OVERRIDE {} 105 virtual void LoadCreditCards() OVERRIDE {}
105 106
106 const MockAutofillMetrics* metric_logger() const { 107 const MockAutofillMetrics* metric_logger() const {
107 return static_cast<const MockAutofillMetrics*>( 108 return static_cast<const MockAutofillMetrics*>(
108 PersonalDataManager::metric_logger()); 109 PersonalDataManager::metric_logger());
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1)); 1561 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1));
1561 autofill_manager_->OnDidFillAutofillFormData( 1562 autofill_manager_->OnDidFillAutofillFormData(
1562 TimeTicks::FromInternalValue(5)); 1563 TimeTicks::FromInternalValue(5));
1563 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1564 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1564 TimeTicks::FromInternalValue(3)); 1565 TimeTicks::FromInternalValue(3));
1565 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1566 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1566 autofill_manager_->Reset(); 1567 autofill_manager_->Reset();
1567 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1568 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1568 } 1569 }
1569 } 1570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698