summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authoracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 23:45:35 +0000
committeracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 23:45:35 +0000
commit2f0158e718ff28a6884ffed00fc740a771e7929f (patch)
tree94e900a0a0be8f5cb20cd76eabfe73dfc1634437 /chrome/browser/automation
parentfdd84dc3a652c41a5f4e27a2363221c7a215f4f3 (diff)
downloadchromium_src-2f0158e718ff28a6884ffed00fc740a771e7929f.zip
chromium_src-2f0158e718ff28a6884ffed00fc740a771e7929f.tar.gz
chromium_src-2f0158e718ff28a6884ffed00fc740a771e7929f.tar.bz2
Revert 104597 - base::Bind: Complete cleanup of history/.
Breaks Linux Touch. BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8163005 TBR=jhawkins@chromium.org Review URL: http://codereview.chromium.org/8207012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc36
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc9
2 files changed, 23 insertions, 22 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 21e47b6..cb6b2ec 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1737,8 +1737,8 @@ void PasswordStoreLoginsChangedObserver::Init() {
BrowserThread::PostTask(
BrowserThread::DB,
FROM_HERE,
- base::Bind(&PasswordStoreLoginsChangedObserver::RegisterObserversTask,
- this));
+ NewRunnableMethod(
+ this, &PasswordStoreLoginsChangedObserver::RegisterObserversTask));
done_event_.Wait();
}
@@ -1764,8 +1764,8 @@ void PasswordStoreLoginsChangedObserver::Observe(
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(&PasswordStoreLoginsChangedObserver::IndicateError, this,
- error));
+ NewRunnableMethod(
+ this, &PasswordStoreLoginsChangedObserver::IndicateError, error));
return;
}
@@ -1775,7 +1775,8 @@ void PasswordStoreLoginsChangedObserver::Observe(
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(&PasswordStoreLoginsChangedObserver::IndicateDone, this));
+ NewRunnableMethod(
+ this, &PasswordStoreLoginsChangedObserver::IndicateDone));
}
void PasswordStoreLoginsChangedObserver::IndicateDone() {
@@ -1908,8 +1909,8 @@ void PageSnapshotTaker::OnDomOperationCompleted(const std::string& json) {
ThumbnailGenerator* generator =
g_browser_process->GetThumbnailGenerator();
- ThumbnailGenerator::ThumbnailReadyCallback callback =
- base::Bind(&PageSnapshotTaker::OnSnapshotTaken, base::Unretained(this));
+ ThumbnailGenerator::ThumbnailReadyCallback* callback =
+ NewCallback(this, &PageSnapshotTaker::OnSnapshotTaken);
// Don't actually start the thumbnail generator, this leads to crashes on
// Mac, crbug.com/62986. Instead, just hook the generator to the
// RenderViewHost manually.
@@ -2272,7 +2273,7 @@ void AutofillChangedObserver::Init() {
BrowserThread::PostTask(
BrowserThread::DB,
FROM_HERE,
- base::Bind(&AutofillChangedObserver::RegisterObserversTask, this));
+ NewRunnableMethod(this, &AutofillChangedObserver::RegisterObserversTask));
done_event_.Wait();
}
@@ -2307,7 +2308,7 @@ void AutofillChangedObserver::Observe(
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
- base::Bind(&AutofillChangedObserver::IndicateDone, this));
+ NewRunnableMethod(this, &AutofillChangedObserver::IndicateDone));
}
}
@@ -2689,10 +2690,10 @@ WaitForProcessLauncherThreadToGoIdleObserver(
AddRef();
BrowserThread::PostTask(
BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
- base::Bind(
+ NewRunnableMethod(
+ this,
&WaitForProcessLauncherThreadToGoIdleObserver::
- RunOnProcessLauncherThread,
- this));
+ RunOnProcessLauncherThread));
}
WaitForProcessLauncherThreadToGoIdleObserver::
@@ -2704,10 +2705,10 @@ RunOnProcessLauncherThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::PROCESS_LAUNCHER));
BrowserThread::PostTask(
BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
- base::Bind(
+ NewRunnableMethod(
+ this,
&WaitForProcessLauncherThreadToGoIdleObserver::
- RunOnProcessLauncherThread2,
- this));
+ RunOnProcessLauncherThread2));
}
void WaitForProcessLauncherThreadToGoIdleObserver::
@@ -2715,8 +2716,9 @@ RunOnProcessLauncherThread2() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::PROCESS_LAUNCHER));
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread,
- this));
+ NewRunnableMethod(
+ this,
+ &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread));
}
void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() {
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 4c0a523..2a0739a 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -10,7 +10,6 @@
#include <vector>
#include "base/bind.h"
-#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/json/json_reader.h"
@@ -739,8 +738,8 @@ void TestingAutomationProvider::GetRedirectsFrom(int tab_handle,
// that it's done: OnRedirectQueryComplete.
redirect_query_ = history_service->QueryRedirectsFrom(
source_url, &consumer_,
- base::Bind(&TestingAutomationProvider::OnRedirectQueryComplete,
- base::Unretained(this)));
+ NewCallback(this,
+ &TestingAutomationProvider::OnRedirectQueryComplete));
return; // Response will be sent when query completes.
}
}
@@ -3022,8 +3021,8 @@ void TestingAutomationProvider::GetHistoryInfo(Browser* browser,
search_text,
options,
&consumer_,
- base::Bind(&AutomationProviderHistoryObserver::HistoryQueryComplete,
- base::Unretained(history_observer)));
+ NewCallback(history_observer,
+ &AutomationProviderHistoryObserver::HistoryQueryComplete));
}
// Sample json input: { "command": "AddHistoryItem",