base::Bind() conversion for ComponentUpdaterService.

BUG=none
TEST=trybots

Review URL: http://codereview.chromium.org/8500008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110986 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc
index c48b90f..feaef13 100644
--- a/chrome/browser/component_updater/component_updater_service.cc
+++ b/chrome/browser/component_updater/component_updater_service.cc
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/at_exit.h"
+#include "base/bind.h"
 #include "base/file_path.h"
 #include "base/file_util.h"
 #include "base/logging.h"
@@ -33,6 +34,9 @@
 
 using content::BrowserThread;
 
+// The component updater is designed to live until process shutdown, so
+// base::Bind() calls are not refcounted.
+
 namespace {
 // Extends an omaha compatible update check url |query| string. Does
 // not mutate the string if it would be longer than |limit| chars.
@@ -323,10 +327,6 @@
   DISALLOW_COPY_AND_ASSIGN(CrxUpdateService);
 };
 
-// The component updater is designed to live until process shutdown, besides
-// we can't be refcounted because we are a singleton.
-DISABLE_RUNNABLE_METHOD_REFCOUNT(CrxUpdateService);
-
 //////////////////////////////////////////////////////////////////////////////
 
 CrxUpdateService::CrxUpdateService(
@@ -693,10 +693,12 @@
         content::Source<std::string>(&context->id),
         content::NotificationService::NoDetails());
 
+    // Why unretained? See comment at top of file.
     BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE,
-        NewRunnableMethod(this, &CrxUpdateService::Install,
-                          context,
-                          temp_crx_path),
+        base::Bind(&CrxUpdateService::Install,
+                   base::Unretained(this),
+                   context,
+                   temp_crx_path),
         config_->StepDelay());
   }
 }
@@ -714,9 +716,10 @@
   if (!file_util::Delete(crx_path, false)) {
     NOTREACHED() << crx_path.value();
   }
+  // Why unretained? See comment at top of file.
   BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
-      NewRunnableMethod(this, &CrxUpdateService::DoneInstalling,
-                        context->id, unpacker.error()),
+      base::Bind(&CrxUpdateService::DoneInstalling, base::Unretained(this),
+                 context->id, unpacker.error()),
       config_->StepDelay());
   delete context;
 }