summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 04:10:19 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 04:10:19 +0000
commitfe6d5ca4089ec0a3effd13eba457a8043539ce63 (patch)
treed9ca4082f77fe138c861f9d6ef3aa769853571f0 /chrome/browser/password_manager
parent5a332fddc29425e09799ffed3cbb20ec5d1c9a65 (diff)
downloadchromium_src-fe6d5ca4089ec0a3effd13eba457a8043539ce63.zip
chromium_src-fe6d5ca4089ec0a3effd13eba457a8043539ce63.tar.gz
chromium_src-fe6d5ca4089ec0a3effd13eba457a8043539ce63.tar.bz2
Add return value to PasswordStore's schedule task.
BUG=120709 TEST= Review URL: https://chromiumcodereview.appspot.com/10381040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
-rw-r--r--chrome/browser/password_manager/password_store.cc4
-rw-r--r--chrome/browser/password_manager/password_store.h2
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc4
-rw-r--r--chrome/browser/password_manager/password_store_mac.h2
4 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc
index aead4fc..f348ff8 100644
--- a/chrome/browser/password_manager/password_store.cc
+++ b/chrome/browser/password_manager/password_store.cc
@@ -93,8 +93,8 @@ PasswordStore::GetLoginsRequest* PasswordStore::NewGetLoginsRequest(
return new GetLoginsRequest(callback);
}
-void PasswordStore::ScheduleTask(const base::Closure& task) {
- BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, task);
+bool PasswordStore::ScheduleTask(const base::Closure& task) {
+ return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, task);
}
void PasswordStore::ForwardLoginsResult(GetLoginsRequest* request) {
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index eaab997..9862cac 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -146,7 +146,7 @@ class PasswordStore
const GetLoginsCallback& callback);
// Schedule the given |task| to be run in the PasswordStore's own thread.
- virtual void ScheduleTask(const base::Closure& task);
+ virtual bool ScheduleTask(const base::Closure& task);
// These will be run in PasswordStore's own thread.
// Synchronous implementation that reports usage metrics.
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index a25a944..2b23db8 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -762,10 +762,12 @@ bool PasswordStoreMac::Init() {
void PasswordStoreMac::ShutdownOnUIThread() {
}
-void PasswordStoreMac::ScheduleTask(const base::Closure& task) {
+bool PasswordStoreMac::ScheduleTask(const base::Closure& task) {
if (thread_.get()) {
thread_->message_loop()->PostTask(FROM_HERE, task);
+ return true;
}
+ return false;
}
void PasswordStoreMac::ReportMetricsImpl() {
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index ddf19ab..6d7bd42 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -41,7 +41,7 @@ class PasswordStoreMac : public PasswordStore {
protected:
virtual ~PasswordStoreMac();
- virtual void ScheduleTask(const base::Closure& task) OVERRIDE;
+ virtual bool ScheduleTask(const base::Closure& task) OVERRIDE;
private:
virtual void ReportMetricsImpl() OVERRIDE;