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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 TestAutofillManager(content::WebContents* web_contents, 183 TestAutofillManager(content::WebContents* web_contents,
184 autofill::AutofillManagerDelegate* manager_delegate, 184 autofill::AutofillManagerDelegate* manager_delegate,
185 TestPersonalDataManager* personal_manager) 185 TestPersonalDataManager* personal_manager)
186 : AutofillManager(web_contents, manager_delegate, personal_manager), 186 : AutofillManager(web_contents, manager_delegate, personal_manager),
187 autofill_enabled_(true), 187 autofill_enabled_(true),
188 did_finish_async_form_submit_(false), 188 did_finish_async_form_submit_(false),
189 message_loop_is_running_(false) { 189 message_loop_is_running_(false) {
190 set_metric_logger(new MockAutofillMetrics); 190 set_metric_logger(new MockAutofillMetrics);
191 } 191 }
192 192
193 virtual bool IsAutofillEnabled() const { return autofill_enabled_; } 193 virtual bool IsAutofillEnabled() const OVERRIDE { return autofill_enabled_; }
194 194
195 void set_autofill_enabled(bool autofill_enabled) { 195 void set_autofill_enabled(bool autofill_enabled) {
196 autofill_enabled_ = autofill_enabled; 196 autofill_enabled_ = autofill_enabled;
197 } 197 }
198 198
199 MockAutofillMetrics* metric_logger() { 199 MockAutofillMetrics* metric_logger() {
200 return static_cast<MockAutofillMetrics*>(const_cast<AutofillMetrics*>( 200 return static_cast<MockAutofillMetrics*>(const_cast<AutofillMetrics*>(
201 AutofillManager::metric_logger())); 201 AutofillManager::metric_logger()));
202 } 202 }
203 203
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1)); 1668 autofill_manager_->OnFormsSeen(forms, TimeTicks::FromInternalValue(1));
1669 autofill_manager_->OnDidFillAutofillFormData( 1669 autofill_manager_->OnDidFillAutofillFormData(
1670 TimeTicks::FromInternalValue(5)); 1670 TimeTicks::FromInternalValue(5));
1671 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), 1671 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(),
1672 TimeTicks::FromInternalValue(3)); 1672 TimeTicks::FromInternalValue(3));
1673 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17)); 1673 autofill_manager_->FormSubmitted(form, TimeTicks::FromInternalValue(17));
1674 autofill_manager_->Reset(); 1674 autofill_manager_->Reset();
1675 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); 1675 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger());
1676 } 1676 }
1677 } 1677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698