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

Unified Diff: components/password_manager/core/browser/affiliation_service.cc

Issue 1008373003: Integrate throttling logic into AffiliationBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment. Created 5 years, 9 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
Index: components/password_manager/core/browser/affiliation_service.cc
diff --git a/components/password_manager/core/browser/affiliation_service.cc b/components/password_manager/core/browser/affiliation_service.cc
index 23ed54def3eaec80f3d4fa5c58215ef8f974de83..58a9c4146c2e1eb57de584c049e5c73d64efada8 100644
--- a/components/password_manager/core/browser/affiliation_service.cc
+++ b/components/password_manager/core/browser/affiliation_service.cc
@@ -11,6 +11,7 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/default_clock.h"
+#include "base/time/default_tick_clock.h"
#include "components/password_manager/core/browser/affiliation_backend.h"
#include "net/url_request/url_request_context_getter.h"
@@ -36,8 +37,12 @@ void AffiliationService::Initialize(
const base::FilePath& db_path) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!backend_);
- backend_ = new AffiliationBackend(request_context_getter,
- make_scoped_ptr(new base::DefaultClock));
+ backend_ =
+ new AffiliationBackend(request_context_getter, backend_task_runner_,
+ make_scoped_ptr(new base::DefaultClock),
+ make_scoped_ptr(new base::DefaultTickClock));
+
+ scoped_ptr<base::TickClock> tick_clock(new base::DefaultTickClock);
backend_task_runner_->PostTask(
FROM_HERE, base::Bind(&AffiliationBackend::Initialize,
base::Unretained(backend_), db_path));

Powered by Google App Engine
This is Rietveld 408576698