update_engine: Replace googe::protobuf::Closure with base::Closure
In order to clean up libchromeos, remove chromeos/callback.h and
switch update_engine from using
googe::protobuf::Closure/NewPermanentCallback to base::Closure/Bind
BUG=chromium:406060
TEST=FEATURES=test emerge-link update_engine
Change-Id: I02d222c3f6c9a5bf5177d58e3a25a596348619bf
Reviewed-on: https://chromium-review.googlesource.com/213675
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/chrome_browser_proxy_resolver.cc b/chrome_browser_proxy_resolver.cc
index 6d489d8..4ee1679 100644
--- a/chrome_browser_proxy_resolver.cc
+++ b/chrome_browser_proxy_resolver.cc
@@ -9,11 +9,11 @@
#include <string>
#include <utility>
+#include <base/bind.h>
#include <base/strings/string_tokenizer.h>
#include <base/strings/string_util.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <dbus/dbus-glib.h>
-#include <google/protobuf/stubs/common.h>
#include "update_engine/dbus_constants.h"
#include "update_engine/glib_utils.h"
@@ -22,8 +22,6 @@
namespace chromeos_update_engine {
using base::StringTokenizer;
-using google::protobuf::Closure;
-using google::protobuf::NewPermanentCallback;
using std::deque;
using std::make_pair;
using std::multimap;
@@ -141,10 +139,10 @@
}
callbacks_.insert(make_pair(url, make_pair(callback, data)));
- Closure* closure = NewPermanentCallback(
- this,
+ base::Closure* closure = new base::Closure(base::Bind(
&ChromeBrowserProxyResolver::HandleTimeout,
- url);
+ base::Unretained(this),
+ url));
GSource* timer = g_timeout_source_new_seconds(timeout);
g_source_set_callback(
timer, utils::GlibRunClosure, closure, utils::GlibDestroyClosure);