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

Side by Side Diff: components/password_manager/core/browser/affiliation_service.cc

Issue 1072413003: Add foundation for trimming the AffiliationDatabase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/password_manager/core/browser/affiliation_service.h" 5 #include "components/password_manager/core/browser/affiliation_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void AffiliationService::TrimCache() { 84 void AffiliationService::TrimCache() {
85 DCHECK(thread_checker_.CalledOnValidThread()); 85 DCHECK(thread_checker_.CalledOnValidThread());
86 DCHECK(backend_); 86 DCHECK(backend_);
87 backend_task_runner_->PostTask( 87 backend_task_runner_->PostTask(
88 FROM_HERE, 88 FROM_HERE,
89 base::Bind(&AffiliationBackend::TrimCache, base::Unretained(backend_))); 89 base::Bind(&AffiliationBackend::TrimCache, base::Unretained(backend_)));
90 } 90 }
91 91
92 // static
93 void AffiliationService::DeleteCache(
94 const base::FilePath& db_path,
95 base::SingleThreadTaskRunner* backend_task_runner) {
vasilii 2015/04/23 13:16:35 AffiliationService should know the correct target
96 backend_task_runner->PostTask(
97 FROM_HERE, base::Bind(&AffiliationBackend::DeleteCache, db_path));
98 }
99
92 } // namespace password_manager 100 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698