Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7628)

Unified Diff: chrome/browser/extensions/file_reader.cc

Issue 12578008: Move CrxFile, FileReader, ExtensionResource to src/extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/file_reader.h ('k') | chrome/browser/extensions/file_reader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/file_reader.cc
diff --git a/chrome/browser/extensions/file_reader.cc b/chrome/browser/extensions/file_reader.cc
deleted file mode 100644
index a71643d2744420f39a31530173ccb30f72516bad..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/file_reader.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/extensions/file_reader.h"
-
-#include "base/bind.h"
-#include "base/file_util.h"
-#include "base/message_loop.h"
-#include "chrome/common/extensions/extension_resource.h"
-#include "content/public/browser/browser_thread.h"
-
-using content::BrowserThread;
-
-FileReader::FileReader(const ExtensionResource& resource,
- const Callback& callback)
- : resource_(resource),
- callback_(callback),
- origin_loop_(MessageLoop::current()) {
-}
-
-void FileReader::Start() {
- BrowserThread::PostTask(
- BrowserThread::FILE, FROM_HERE,
- base::Bind(&FileReader::ReadFileOnBackgroundThread, this));
-}
-
-FileReader::~FileReader() {}
-
-void FileReader::ReadFileOnBackgroundThread() {
- std::string data;
- bool success = file_util::ReadFileToString(resource_.GetFilePath(), &data);
- origin_loop_->PostTask(FROM_HERE, base::Bind(callback_, success, data));
-}
« no previous file with comments | « chrome/browser/extensions/file_reader.h ('k') | chrome/browser/extensions/file_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698