Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1432)

Side by Side Diff: chrome/browser/drive/drive_api_util.h

Issue 442193002: Parse Drive API responses all at once in the blocking pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + really drop GetDataRequest Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Drive API v2. Unfortunately, there is no support on Drive API v2, so we need 70 // Drive API v2. Unfortunately, there is no support on Drive API v2, so we need
71 // to fall back to GData WAPI for the GetShareUrl. Thus, these are shared by 71 // to fall back to GData WAPI for the GetShareUrl. Thus, these are shared by
72 // both GDataWapiService and DriveAPIService. 72 // both GDataWapiService and DriveAPIService.
73 // TODO(hidehiko): Remove these from here, when Drive API v2 supports 73 // TODO(hidehiko): Remove these from here, when Drive API v2 supports
74 // GetShareUrl. 74 // GetShareUrl.
75 75
76 // OAuth2 scopes for the GData WAPI. 76 // OAuth2 scopes for the GData WAPI.
77 extern const char kDocsListScope[]; 77 extern const char kDocsListScope[];
78 extern const char kDriveAppsScope[]; 78 extern const char kDriveAppsScope[];
79 79
80 // Extracts an url to the sharing dialog and returns it via |callback|. If
81 // the share url doesn't exist, then an empty url is returned.
82 void ParseShareUrlAndRun(const google_apis::GetShareUrlCallback& callback,
83 google_apis::GDataErrorCode error,
84 scoped_ptr<base::Value> value);
85
86 // Converts FileResource to ResourceEntry. 80 // Converts FileResource to ResourceEntry.
87 scoped_ptr<google_apis::ResourceEntry> 81 scoped_ptr<google_apis::ResourceEntry>
88 ConvertFileResourceToResourceEntry( 82 ConvertFileResourceToResourceEntry(
89 const google_apis::FileResource& file_resource); 83 const google_apis::FileResource& file_resource);
90 84
91 // Converts ChangeResource to ResourceEntry. 85 // Converts ChangeResource to ResourceEntry.
92 scoped_ptr<google_apis::ResourceEntry> 86 scoped_ptr<google_apis::ResourceEntry>
93 ConvertChangeResourceToResourceEntry( 87 ConvertChangeResourceToResourceEntry(
94 const google_apis::ChangeResource& change_resource); 88 const google_apis::ChangeResource& change_resource);
95 89
(...skipping 18 matching lines...) Expand all
114 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); 108 bool IsKnownHostedDocumentMimeType(const std::string& mime_type);
115 109
116 // Returns true if the given file path has an extension corresponding to one of 110 // Returns true if the given file path has an extension corresponding to one of
117 // hosted document types. 111 // hosted document types.
118 bool HasHostedDocumentExtension(const base::FilePath& path); 112 bool HasHostedDocumentExtension(const base::FilePath& path);
119 113
120 } // namespace util 114 } // namespace util
121 } // namespace drive 115 } // namespace drive
122 116
123 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ 117 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698