| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // both GDataWapiService and DriveAPIService. | 77 // both GDataWapiService and DriveAPIService. |
| 78 // TODO(hidehiko): Remove these from here, when Drive API v2 supports | 78 // TODO(hidehiko): Remove these from here, when Drive API v2 supports |
| 79 // GetShareUrl. | 79 // GetShareUrl. |
| 80 | 80 |
| 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::GetUrlCallback& 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. | 91 // Converts ResourceEntry to FileResource. |
| 92 scoped_ptr<google_apis::FileResource> | 92 scoped_ptr<google_apis::FileResource> |
| 93 ConvertResourceEntryToFileResource(const google_apis::ResourceEntry& entry); | 93 ConvertResourceEntryToFileResource(const google_apis::ResourceEntry& entry); |
| 94 | 94 |
| 95 // Returns the GData WAPI's Kind of the FileResource. | 95 // Returns the GData WAPI's Kind of the FileResource. |
| 96 google_apis::DriveEntryKind GetKind( | 96 google_apis::DriveEntryKind GetKind( |
| 97 const google_apis::FileResource& file_resource); | 97 const google_apis::FileResource& file_resource); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 119 std::string GetMd5Digest(const base::FilePath& file_path); | 119 std::string GetMd5Digest(const base::FilePath& file_path); |
| 120 | 120 |
| 121 // The resource ID for the root directory for WAPI is defined in the spec: | 121 // The resource ID for the root directory for WAPI is defined in the spec: |
| 122 // https://developers.google.com/google-apps/documents-list/ | 122 // https://developers.google.com/google-apps/documents-list/ |
| 123 extern const char kWapiRootDirectoryResourceId[]; | 123 extern const char kWapiRootDirectoryResourceId[]; |
| 124 | 124 |
| 125 } // namespace util | 125 } // namespace util |
| 126 } // namespace drive | 126 } // namespace drive |
| 127 | 127 |
| 128 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 128 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
| OLD | NEW |