summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 17:34:45 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 17:34:45 +0000
commit646526fe540ccddf9047f6e9b77cd68956794dcd (patch)
tree3c2399146811a995db858a3a1087a2ad8627bc39 /chrome/browser/bookmarks
parent1586dd9621f987a8f11cf43931e004f49f727f95 (diff)
downloadchromium_src-646526fe540ccddf9047f6e9b77cd68956794dcd.zip
chromium_src-646526fe540ccddf9047f6e9b77cd68956794dcd.tar.gz
chromium_src-646526fe540ccddf9047f6e9b77cd68956794dcd.tar.bz2
Move PrintDialogGtk file delete to the file thread.
Cleanup a similar call in bookmarks storage too. BUG=60988 Review URL: http://codereview.chromium.org/4172007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r--chrome/browser/bookmarks/bookmark_storage.cc23
1 files changed, 6 insertions, 17 deletions
diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc
index 6cbe433..ee50a71 100644
--- a/chrome/browser/bookmarks/bookmark_storage.cc
+++ b/chrome/browser/bookmarks/bookmark_storage.cc
@@ -6,6 +6,7 @@
#include "base/compiler_specific.h"
#include "base/file_util.h"
+#include "base/file_util_proxy.h"
#include "base/metrics/histogram.h"
#include "base/time.h"
#include "chrome/browser/bookmarks/bookmark_codec.h"
@@ -43,21 +44,6 @@ class BackupTask : public Task {
DISALLOW_COPY_AND_ASSIGN(BackupTask);
};
-class FileDeleteTask : public Task {
- public:
- explicit FileDeleteTask(const FilePath& path) : path_(path) {
- }
-
- virtual void Run() {
- file_util::Delete(path_, true);
- }
-
- private:
- const FilePath path_;
-
- DISALLOW_COPY_AND_ASSIGN(FileDeleteTask);
-};
-
} // namespace
class BookmarkStorage::LoadTask : public Task {
@@ -244,8 +230,11 @@ void BookmarkStorage::OnLoadFinished(bool file_exists, const FilePath& path) {
SaveNow();
// Clean up after migration from history.
- BrowserThread::PostTask(
- BrowserThread::FILE, FROM_HERE, new FileDeleteTask(tmp_history_path_));
+ base::FileUtilProxy::Delete(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+ tmp_history_path_,
+ false,
+ NULL);
}
}