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 #ifndef WEBKIT_FILEAPI_SYNCABLE_SYNCABLE_FILE_SYSTEM_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_SYNCABLE_SYNCABLE_FILE_SYSTEM_UTIL_H_ |
6 #define WEBKIT_FILEAPI_SYNCABLE_SYNCABLE_FILE_SYSTEM_UTIL_H_ | 6 #define WEBKIT_FILEAPI_SYNCABLE_SYNCABLE_FILE_SYSTEM_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Creates a FileSystem URL for the |path| in a syncable filesystem | 32 // Creates a FileSystem URL for the |path| in a syncable filesystem |
33 // identifiable by a pair of |origin| and |service_name|. | 33 // identifiable by a pair of |origin| and |service_name|. |
34 // | 34 // |
35 // Example: Assume following arguments are given: | 35 // Example: Assume following arguments are given: |
36 // origin: 'http://www.example.com/', | 36 // origin: 'http://www.example.com/', |
37 // service_name: 'service_name', | 37 // service_name: 'service_name', |
38 // path: '/foo/bar', | 38 // path: '/foo/bar', |
39 // returns 'filesystem:http://www.example.com/external/service_name/foo/bar' | 39 // returns 'filesystem:http://www.example.com/external/service_name/foo/bar' |
40 WEBKIT_STORAGE_EXPORT FileSystemURL CreateSyncableFileSystemURL( | 40 WEBKIT_STORAGE_EXPORT FileSystemURL CreateSyncableFileSystemURL( |
41 const GURL& origin, const std::string& service_name, const FilePath& path); | 41 const GURL& origin, const std::string& service_name, |
| 42 const base::FilePath& path); |
42 | 43 |
43 // Serializes a given FileSystemURL |url| and sets the serialized string to | 44 // Serializes a given FileSystemURL |url| and sets the serialized string to |
44 // |serialized_url|. If the URL does not represent a syncable filesystem, | 45 // |serialized_url|. If the URL does not represent a syncable filesystem, |
45 // |serialized_url| is not filled in, and returns false. Separators of the | 46 // |serialized_url| is not filled in, and returns false. Separators of the |
46 // path will be normalized depending on its platform. | 47 // path will be normalized depending on its platform. |
47 // | 48 // |
48 // Example: Assume a following FileSystemURL object is given: | 49 // Example: Assume a following FileSystemURL object is given: |
49 // origin() returns 'http://www.example.com/', | 50 // origin() returns 'http://www.example.com/', |
50 // type() returns the kFileSystemTypeSyncable, | 51 // type() returns the kFileSystemTypeSyncable, |
51 // filesystem_id() returns 'service_name', | 52 // filesystem_id() returns 'service_name', |
(...skipping 25 matching lines...) Expand all Loading... |
77 // * does NOT notify the file change tracker, but | 78 // * does NOT notify the file change tracker, but |
78 // * notifies the regular sandboxed quota observer | 79 // * notifies the regular sandboxed quota observer |
79 // therefore quota will be updated appropriately without bothering the | 80 // therefore quota will be updated appropriately without bothering the |
80 // change tracker. | 81 // change tracker. |
81 WEBKIT_STORAGE_EXPORT LocalFileSystemOperation* | 82 WEBKIT_STORAGE_EXPORT LocalFileSystemOperation* |
82 CreateFileSystemOperationForSync(FileSystemContext* file_system_context); | 83 CreateFileSystemOperationForSync(FileSystemContext* file_system_context); |
83 | 84 |
84 } // namespace fileapi | 85 } // namespace fileapi |
85 | 86 |
86 #endif // WEBKIT_FILEAPI_SYNCABLE_SYNCABLE_FILE_SYSTEM_UTIL_H_ | 87 #endif // WEBKIT_FILEAPI_SYNCABLE_SYNCABLE_FILE_SYSTEM_UTIL_H_ |
OLD | NEW |