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 CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
6 #define CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 6 #define CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // OAuth2 scopes for the GData WAPI. | 81 // OAuth2 scopes for the GData WAPI. |
82 extern const char kDocsListScope[]; | 82 extern const char kDocsListScope[]; |
83 extern const char kDriveAppsScope[]; | 83 extern const char kDriveAppsScope[]; |
84 | 84 |
85 // Extracts an url to the sharing dialog and returns it via |callback|. If | 85 // Extracts an url to the sharing dialog and returns it via |callback|. If |
86 // the share url doesn't exist, then an empty url is returned. | 86 // the share url doesn't exist, then an empty url is returned. |
87 void ParseShareUrlAndRun(const google_apis::GetShareUrlCallback& callback, | 87 void ParseShareUrlAndRun(const google_apis::GetShareUrlCallback& callback, |
88 google_apis::GDataErrorCode error, | 88 google_apis::GDataErrorCode error, |
89 scoped_ptr<base::Value> value); | 89 scoped_ptr<base::Value> value); |
90 | 90 |
91 // Converts ResourceEntry to FileResource. | |
92 scoped_ptr<google_apis::FileResource> | |
93 ConvertResourceEntryToFileResource(const google_apis::ResourceEntry& entry); | |
94 | |
95 // Returns the GData WAPI's Kind of the FileResource. | 91 // Returns the GData WAPI's Kind of the FileResource. |
96 google_apis::DriveEntryKind GetKind( | 92 google_apis::DriveEntryKind GetKind( |
97 const google_apis::FileResource& file_resource); | 93 const google_apis::FileResource& file_resource); |
98 | 94 |
99 // Converts FileResource to ResourceEntry. | 95 // Converts FileResource to ResourceEntry. |
100 scoped_ptr<google_apis::ResourceEntry> | 96 scoped_ptr<google_apis::ResourceEntry> |
101 ConvertFileResourceToResourceEntry( | 97 ConvertFileResourceToResourceEntry( |
102 const google_apis::FileResource& file_resource); | 98 const google_apis::FileResource& file_resource); |
103 | 99 |
104 // Converts ChangeResource to ResourceEntry. | 100 // Converts ChangeResource to ResourceEntry. |
(...skipping 14 matching lines...) Expand all Loading... |
119 std::string GetMd5Digest(const base::FilePath& file_path); | 115 std::string GetMd5Digest(const base::FilePath& file_path); |
120 | 116 |
121 // The resource ID for the root directory for WAPI is defined in the spec: | 117 // The resource ID for the root directory for WAPI is defined in the spec: |
122 // https://developers.google.com/google-apps/documents-list/ | 118 // https://developers.google.com/google-apps/documents-list/ |
123 extern const char kWapiRootDirectoryResourceId[]; | 119 extern const char kWapiRootDirectoryResourceId[]; |
124 | 120 |
125 } // namespace util | 121 } // namespace util |
126 } // namespace drive | 122 } // namespace drive |
127 | 123 |
128 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 124 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
OLD | NEW |