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 "webkit/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.h" | 14 #include "base/message_loop.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/sys_string_conversions.h" | 18 #include "base/strings/sys_string_conversions.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "webkit/base/origin_url_conversions.h" | 21 #include "webkit/base/origin_url_conversions.h" |
22 #include "webkit/browser/fileapi/file_observers.h" | 22 #include "webkit/browser/fileapi/file_observers.h" |
23 #include "webkit/browser/fileapi/file_system_context.h" | 23 #include "webkit/browser/fileapi/file_system_context.h" |
24 #include "webkit/browser/fileapi/file_system_operation_context.h" | 24 #include "webkit/browser/fileapi/file_system_operation_context.h" |
25 #include "webkit/browser/fileapi/file_system_url.h" | 25 #include "webkit/browser/fileapi/file_system_url.h" |
26 #include "webkit/browser/fileapi/native_file_util.h" | 26 #include "webkit/browser/fileapi/native_file_util.h" |
27 #include "webkit/browser/fileapi/sandbox_mount_point_provider.h" | 27 #include "webkit/browser/fileapi/sandbox_mount_point_provider.h" |
| 28 #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h" |
28 #include "webkit/common/fileapi/file_system_util.h" | 29 #include "webkit/common/fileapi/file_system_util.h" |
29 #include "webkit/fileapi/syncable/syncable_file_system_util.h" | |
30 #include "webkit/quota/quota_manager.h" | 30 #include "webkit/quota/quota_manager.h" |
31 | 31 |
32 // Example of various paths: | 32 // Example of various paths: |
33 // void ObfuscatedFileUtil::DoSomething(const FileSystemURL& url) { | 33 // void ObfuscatedFileUtil::DoSomething(const FileSystemURL& url) { |
34 // base::FilePath virtual_path = url.path(); | 34 // base::FilePath virtual_path = url.path(); |
35 // base::FilePath local_path = GetLocalFilePath(url); | 35 // base::FilePath local_path = GetLocalFilePath(url); |
36 // | 36 // |
37 // NativeFileUtil::DoSomething(local_path); | 37 // NativeFileUtil::DoSomething(local_path); |
38 // file_util::DoAnother(local_path); | 38 // file_util::DoAnother(local_path); |
39 // } | 39 // } |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 // If truncating we need to update the usage. | 1356 // If truncating we need to update the usage. |
1357 if (error == base::PLATFORM_FILE_OK && delta) { | 1357 if (error == base::PLATFORM_FILE_OK && delta) { |
1358 UpdateUsage(context, url, delta); | 1358 UpdateUsage(context, url, delta); |
1359 context->change_observers()->Notify( | 1359 context->change_observers()->Notify( |
1360 &FileChangeObserver::OnModifyFile, MakeTuple(url)); | 1360 &FileChangeObserver::OnModifyFile, MakeTuple(url)); |
1361 } | 1361 } |
1362 return error; | 1362 return error; |
1363 } | 1363 } |
1364 | 1364 |
1365 } // namespace fileapi | 1365 } // namespace fileapi |
OLD | NEW |