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/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index e2167cd..da643bf 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 #include <string>
 
+#include <base/bind.h>
 #include <base/logging.h>
 #include <base/strings/string_util.h>
 #include <base/strings/stringprintf.h>
@@ -15,7 +16,6 @@
 #include "update_engine/hardware_interface.h"
 #include "update_engine/utils.h"
 
-using google::protobuf::NewPermanentCallback;
 using std::make_pair;
 using std::max;
 using std::string;
@@ -221,9 +221,9 @@
 void LibcurlHttpFetcher::BeginTransfer(const std::string& url) {
   CHECK(!transfer_in_progress_);
   url_ = url;
-  if (!ResolveProxiesForUrl(
-          url_,
-          NewPermanentCallback(this, &LibcurlHttpFetcher::ProxiesResolved))) {
+  auto closure = base::Bind(&LibcurlHttpFetcher::ProxiesResolved,
+                            base::Unretained(this));
+  if (!ResolveProxiesForUrl(url_, new base::Closure(closure))) {
     LOG(ERROR) << "Couldn't resolve proxies";
     if (delegate_)
       delegate_->TransferComplete(this, false);