diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-23 22:57:05 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-23 22:57:05 +0000 |
commit | 8de36ee3ddfb84e5eaba132e104c44a9652c2570 (patch) | |
tree | 381ec81a9bfdc495fc6297f0fc11225ca777dec1 /chrome/browser/omnibox_search_hint.cc | |
parent | 5cad30af4b91d81eac3600832d007c340fb48f88 (diff) | |
download | chromium_src-8de36ee3ddfb84e5eaba132e104c44a9652c2570.zip chromium_src-8de36ee3ddfb84e5eaba132e104c44a9652c2570.tar.gz chromium_src-8de36ee3ddfb84e5eaba132e104c44a9652c2570.tar.bz2 |
Revert 111425 - base::Bind fixes
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8566033
TBR=groby@chromium.org
Review URL: http://codereview.chromium.org/8677024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/omnibox_search_hint.cc')
-rw-r--r-- | chrome/browser/omnibox_search_hint.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc index 8e0ae20..22ff1b5 100644 --- a/chrome/browser/omnibox_search_hint.cc +++ b/chrome/browser/omnibox_search_hint.cc @@ -4,9 +4,7 @@ #include "chrome/browser/omnibox_search_hint.h" -#include "base/bind.h" #include "base/command_line.h" -#include "base/memory/weak_ptr.h" #include "base/metrics/histogram.h" #include "base/task.h" // TODO(avi): remove when conversions not needed any more @@ -81,7 +79,7 @@ class HintInfoBar : public ConfirmInfoBarDelegate { bool should_expire_; // Used to delay the expiration of the info-bar. - base::WeakPtrFactory<HintInfoBar> weak_factory_; + ScopedRunnableMethodFactory<HintInfoBar> method_factory_; DISALLOW_COPY_AND_ASSIGN(HintInfoBar); }; @@ -91,12 +89,11 @@ HintInfoBar::HintInfoBar(OmniboxSearchHint* omnibox_hint) omnibox_hint_(omnibox_hint), action_taken_(false), should_expire_(false), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { + ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { // We want the info-bar to stick-around for few seconds and then be hidden // on the next navigation after that. - MessageLoop::current()->PostDelayedTask( - FROM_HERE, - base::Bind(&HintInfoBar::AllowExpiry, weak_factory_.GetWeakPtr()), + MessageLoop::current()->PostDelayedTask(FROM_HERE, + method_factory_.NewRunnableMethod(&HintInfoBar::AllowExpiry), 8000); // 8 seconds. } |