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

Side by Side Diff: chrome/browser/browsing_data/passwords_counter.cc

Issue 1342093003: Decouple the browsing data counters initialization and start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Restart() to tests as well. Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "chrome/browser/browsing_data/passwords_counter.h" 5 #include "chrome/browser/browsing_data/passwords_counter.h"
6 #include "chrome/browser/password_manager/password_store_factory.h" 6 #include "chrome/browser/password_manager/password_store_factory.h"
7 #include "chrome/common/pref_names.h" 7 #include "chrome/common/pref_names.h"
8 #include "components/password_manager/core/browser/password_store.h" 8 #include "components/password_manager/core/browser/password_store.h"
9 9
10 PasswordsCounter::PasswordsCounter() : pref_name_(prefs::kDeletePasswords) {} 10 PasswordsCounter::PasswordsCounter() : pref_name_(prefs::kDeletePasswords) {}
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ReportResult(std::count_if( 47 ReportResult(std::count_if(
48 results.begin(), 48 results.begin(),
49 results.end(), 49 results.end(),
50 [start](const autofill::PasswordForm* form) { 50 [start](const autofill::PasswordForm* form) {
51 return form->date_created >= start; 51 return form->date_created >= start;
52 })); 52 }));
53 } 53 }
54 54
55 void PasswordsCounter::OnLoginsChanged( 55 void PasswordsCounter::OnLoginsChanged(
56 const password_manager::PasswordStoreChangeList& changes) { 56 const password_manager::PasswordStoreChangeList& changes) {
57 RestartCounting(); 57 Restart();
58 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_counter.cc ('k') | chrome/browser/browsing_data/passwords_counter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698