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

Unified Diff: storage/common/blob/shareable_file_reference.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | « storage/common/blob/shareable_file_reference.h ('k') | storage/common/data_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/common/blob/shareable_file_reference.cc
diff --git a/webkit/common/blob/shareable_file_reference.cc b/storage/common/blob/shareable_file_reference.cc
similarity index 86%
rename from webkit/common/blob/shareable_file_reference.cc
rename to storage/common/blob/shareable_file_reference.cc
index b9db348e56130149569c59c781c6eaf291f9f27c..cadd8e3fed6d14bbf2f0fe17eea9e462397b0cd8 100644
--- a/webkit/common/blob/shareable_file_reference.cc
+++ b/storage/common/blob/shareable_file_reference.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/common/blob/shareable_file_reference.h"
+#include "storage/common/blob/shareable_file_reference.h"
#include <map>
@@ -11,7 +11,7 @@
#include "base/task_runner.h"
#include "base/threading/non_thread_safe.h"
-namespace webkit_blob {
+namespace storage {
namespace {
@@ -25,9 +25,7 @@ class ShareableFileMap : public base::NonThreadSafe {
ShareableFileMap() {}
- ~ShareableFileMap() {
- DetachFromThread();
- }
+ ~ShareableFileMap() { DetachFromThread(); }
iterator Find(key_type key) {
DCHECK(CalledOnValidThread());
@@ -72,9 +70,8 @@ scoped_refptr<ShareableFileReference> ShareableFileReference::GetOrCreate(
const base::FilePath& path,
FinalReleasePolicy policy,
base::TaskRunner* file_task_runner) {
- return GetOrCreate(
- ScopedFile(path, static_cast<ScopedFile::ScopeOutPolicy>(policy),
- file_task_runner));
+ return GetOrCreate(ScopedFile(
+ path, static_cast<ScopedFile::ScopeOutPolicy>(policy), file_task_runner));
}
// static
@@ -84,8 +81,9 @@ scoped_refptr<ShareableFileReference> ShareableFileReference::GetOrCreate(
return scoped_refptr<ShareableFileReference>();
typedef std::pair<ShareableFileMap::iterator, bool> InsertResult;
- // Required for VS2010: http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair
- webkit_blob::ShareableFileReference* null_reference = NULL;
+ // Required for VS2010:
+ // http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair
+ storage::ShareableFileReference* null_reference = NULL;
InsertResult result = g_file_map.Get().Insert(
ShareableFileMap::value_type(scoped_file.path(), null_reference));
if (result.second == false) {
@@ -116,4 +114,4 @@ ShareableFileReference::~ShareableFileReference() {
g_file_map.Get().Erase(path());
}
-} // namespace webkit_blob
+} // namespace storage
« no previous file with comments | « storage/common/blob/shareable_file_reference.h ('k') | storage/common/data_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698