OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/browser/fileapi/obfuscated_file_util.h" | 5 #include "storage/browser/fileapi/obfuscated_file_util.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/format_macros.h" | 12 #include "base/format_macros.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "storage/browser/fileapi/file_observers.h" |
| 23 #include "storage/browser/fileapi/file_system_context.h" |
| 24 #include "storage/browser/fileapi/file_system_operation_context.h" |
| 25 #include "storage/browser/fileapi/file_system_url.h" |
| 26 #include "storage/browser/fileapi/native_file_util.h" |
| 27 #include "storage/browser/fileapi/sandbox_file_system_backend.h" |
| 28 #include "storage/browser/fileapi/sandbox_isolated_origin_database.h" |
| 29 #include "storage/browser/fileapi/sandbox_origin_database.h" |
| 30 #include "storage/browser/fileapi/sandbox_prioritized_origin_database.h" |
| 31 #include "storage/browser/fileapi/timed_task_helper.h" |
| 32 #include "storage/browser/quota/quota_manager.h" |
| 33 #include "storage/common/database/database_identifier.h" |
| 34 #include "storage/common/fileapi/file_system_util.h" |
22 #include "url/gurl.h" | 35 #include "url/gurl.h" |
23 #include "webkit/browser/fileapi/file_observers.h" | |
24 #include "webkit/browser/fileapi/file_system_context.h" | |
25 #include "webkit/browser/fileapi/file_system_operation_context.h" | |
26 #include "webkit/browser/fileapi/file_system_url.h" | |
27 #include "webkit/browser/fileapi/native_file_util.h" | |
28 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | |
29 #include "webkit/browser/fileapi/sandbox_isolated_origin_database.h" | |
30 #include "webkit/browser/fileapi/sandbox_origin_database.h" | |
31 #include "webkit/browser/fileapi/sandbox_prioritized_origin_database.h" | |
32 #include "webkit/browser/fileapi/timed_task_helper.h" | |
33 #include "webkit/browser/quota/quota_manager.h" | |
34 #include "webkit/common/database/database_identifier.h" | |
35 #include "webkit/common/fileapi/file_system_util.h" | |
36 | 36 |
37 // Example of various paths: | 37 // Example of various paths: |
38 // void ObfuscatedFileUtil::DoSomething(const FileSystemURL& url) { | 38 // void ObfuscatedFileUtil::DoSomething(const FileSystemURL& url) { |
39 // base::FilePath virtual_path = url.path(); | 39 // base::FilePath virtual_path = url.path(); |
40 // base::FilePath local_path = GetLocalFilePath(url); | 40 // base::FilePath local_path = GetLocalFilePath(url); |
41 // | 41 // |
42 // NativeFileUtil::DoSomething(local_path); | 42 // NativeFileUtil::DoSomething(local_path); |
43 // file_util::DoAnother(local_path); | 43 // file_util::DoAnother(local_path); |
44 // } | 44 // } |
45 | 45 |
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 } | 1415 } |
1416 return file.Pass(); | 1416 return file.Pass(); |
1417 } | 1417 } |
1418 | 1418 |
1419 bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) { | 1419 bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) { |
1420 return special_storage_policy_.get() && | 1420 return special_storage_policy_.get() && |
1421 special_storage_policy_->HasIsolatedStorage(origin); | 1421 special_storage_policy_->HasIsolatedStorage(origin); |
1422 } | 1422 } |
1423 | 1423 |
1424 } // namespace storage | 1424 } // namespace storage |
OLD | NEW |