summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/customization_document.cc
diff options
context:
space:
mode:
authorachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 21:51:13 +0000
committerachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 21:51:13 +0000
commit3d9d72fcffa01dc68aace3f02c592ef14dea9a08 (patch)
treee4a18494ec3a2f11913984eb5404fdfc8c6e72cb /chrome/browser/chromeos/customization_document.cc
parenta42d4638f0335dbfd14c1c9f6b05a7b09703a78e (diff)
downloadchromium_src-3d9d72fcffa01dc68aace3f02c592ef14dea9a08.zip
chromium_src-3d9d72fcffa01dc68aace3f02c592ef14dea9a08.tar.gz
chromium_src-3d9d72fcffa01dc68aace3f02c592ef14dea9a08.tar.bz2
Replace NewRunnableMethod with Bind in CustomizationDocument.
BUG=chromium-os:22024 TEST=tests pass. Review URL: http://codereview.chromium.org/8375049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/customization_document.cc')
-rw-r--r--chrome/browser/chromeos/customization_document.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/customization_document.cc b/chrome/browser/chromeos/customization_document.cc
index a635ee7..128deee 100644
--- a/chrome/browser/chromeos/customization_document.cc
+++ b/chrome/browser/chromeos/customization_document.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/customization_document.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/json/json_reader.h"
@@ -268,9 +270,9 @@ void ServicesCustomizationDocument::SetApplied(bool val) {
void ServicesCustomizationDocument::StartFetching() {
if (url_.SchemeIsFile()) {
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- NewRunnableMethod(this,
- &ServicesCustomizationDocument::ReadFileInBackground,
- FilePath(url_.path())));
+ base::Bind(&ServicesCustomizationDocument::ReadFileInBackground,
+ base::Unretained(this), // this class is a singleton.
+ FilePath(url_.path())));
} else {
StartFileFetch();
}
@@ -282,10 +284,10 @@ void ServicesCustomizationDocument::ReadFileInBackground(const FilePath& file) {
std::string manifest;
if (file_util::ReadFileToString(file, &manifest)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- NewRunnableMethod(
- this,
+ base::IgnoreReturn<bool>(base::Bind(
&ServicesCustomizationDocument::LoadManifestFromString,
- manifest));
+ base::Unretained(this), // this class is a singleton.
+ manifest)));
} else {
VLOG(1) << "Failed to load services customization manifest from: "
<< file.value();