OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h" | 5 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 class ObfuscatedOriginEnumerator | 89 class ObfuscatedOriginEnumerator |
90 : public SandboxFileSystemBackendDelegate::OriginEnumerator { | 90 : public SandboxFileSystemBackendDelegate::OriginEnumerator { |
91 public: | 91 public: |
92 explicit ObfuscatedOriginEnumerator(ObfuscatedFileUtil* file_util) { | 92 explicit ObfuscatedOriginEnumerator(ObfuscatedFileUtil* file_util) { |
93 enum_.reset(file_util->CreateOriginEnumerator()); | 93 enum_.reset(file_util->CreateOriginEnumerator()); |
94 } | 94 } |
95 virtual ~ObfuscatedOriginEnumerator() {} | 95 virtual ~ObfuscatedOriginEnumerator() {} |
96 | 96 |
97 virtual GURL Next() OVERRIDE { | 97 virtual GURL Next() override { |
98 return enum_->Next(); | 98 return enum_->Next(); |
99 } | 99 } |
100 | 100 |
101 virtual bool HasFileSystemType(FileSystemType type) const OVERRIDE { | 101 virtual bool HasFileSystemType(FileSystemType type) const override { |
102 return enum_->HasTypeDirectory( | 102 return enum_->HasTypeDirectory( |
103 SandboxFileSystemBackendDelegate::GetTypeString(type)); | 103 SandboxFileSystemBackendDelegate::GetTypeString(type)); |
104 } | 104 } |
105 | 105 |
106 private: | 106 private: |
107 scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enum_; | 107 scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enum_; |
108 }; | 108 }; |
109 | 109 |
110 void OpenFileSystemOnFileTaskRunner( | 110 void OpenFileSystemOnFileTaskRunner( |
111 ObfuscatedFileUtil* file_util, | 111 ObfuscatedFileUtil* file_util, |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 return new ObfuscatedFileUtil(special_storage_policy, | 664 return new ObfuscatedFileUtil(special_storage_policy, |
665 file_system_directory, | 665 file_system_directory, |
666 env_override, | 666 env_override, |
667 file_task_runner, | 667 file_task_runner, |
668 base::Bind(&GetTypeStringForURL), | 668 base::Bind(&GetTypeStringForURL), |
669 GetKnownTypeStrings(), | 669 GetKnownTypeStrings(), |
670 NULL); | 670 NULL); |
671 } | 671 } |
672 | 672 |
673 } // namespace storage | 673 } // namespace storage |
OLD | NEW |