| 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
|
|
|