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

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

Issue 868253005: AffiliationBackend: Implement the better part of on-demand fetching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tidy up NULL time related issues. Created 5 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 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 b6b34b41500e99f337a5da6e882eb44bdc5efacd..b47ec07d533f1caf038af1736b00b6905979a92a 100644
--- a/components/password_manager/core/browser/affiliation_service.cc
+++ b/components/password_manager/core/browser/affiliation_service.cc
@@ -6,10 +6,13 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/files/file_path.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
+#include "base/time/default_clock.h"
#include "components/password_manager/core/browser/affiliation_backend.h"
+#include "net/url_request/url_request_context_getter.h"
namespace password_manager {
@@ -28,13 +31,16 @@ AffiliationService::~AffiliationService() {
}
}
-void AffiliationService::Initialize() {
+void AffiliationService::Initialize(
+ net::URLRequestContextGetter* request_context_getter,
+ const base::FilePath& db_path) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!backend_);
- backend_ = new AffiliationBackend();
+ backend_ = new AffiliationBackend(request_context_getter,
+ make_scoped_ptr(new base::DefaultClock));
backend_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&AffiliationBackend::Initialize, base::Unretained(backend_)));
+ FROM_HERE, base::Bind(&AffiliationBackend::Initialize,
+ base::Unretained(backend_), db_path));
}
void AffiliationService::GetAffiliations(

Powered by Google App Engine
This is Rietveld 408576698