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

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

Issue 445473002: Remove ResourceIdCanonicalizer from DriveServiceInterface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/drive/drive_api_service.cc ('k') | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "chrome/browser/drive/drive_service_interface.h"
12 #include "google_apis/drive/drive_common_callbacks.h" 11 #include "google_apis/drive/drive_common_callbacks.h"
13 #include "google_apis/drive/gdata_errorcode.h" 12 #include "google_apis/drive/gdata_errorcode.h"
14 13
15 class GURL; 14 class GURL;
16 15
17 namespace base { 16 namespace base {
18 class FilePath; 17 class FilePath;
19 class Value; 18 class Value;
20 } // namespace base 19 } // namespace base
21 20
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // See also: https://developers.google.com/drive/search-parameters 59 // See also: https://developers.google.com/drive/search-parameters
61 std::string TranslateQuery(const std::string& original_query); 60 std::string TranslateQuery(const std::string& original_query);
62 61
63 // Extracts resource_id out of edit url. 62 // Extracts resource_id out of edit url.
64 std::string ExtractResourceIdFromUrl(const GURL& url); 63 std::string ExtractResourceIdFromUrl(const GURL& url);
65 64
66 // If |resource_id| is in the old resource ID format used by WAPI, converts it 65 // If |resource_id| is in the old resource ID format used by WAPI, converts it
67 // into the new format. 66 // into the new format.
68 std::string CanonicalizeResourceId(const std::string& resource_id); 67 std::string CanonicalizeResourceId(const std::string& resource_id);
69 68
70 // Returns a ResourceIdCanonicalizer which returns the argument.
71 ResourceIdCanonicalizer GetIdentityResourceIdCanonicalizer();
72
73 // Note: Following constants and a function are used to support GetShareUrl on 69 // Note: Following constants and a function are used to support GetShareUrl on
74 // 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
75 // 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
76 // both GDataWapiService and DriveAPIService. 72 // both GDataWapiService and DriveAPIService.
77 // TODO(hidehiko): Remove these from here, when Drive API v2 supports 73 // TODO(hidehiko): Remove these from here, when Drive API v2 supports
78 // GetShareUrl. 74 // GetShareUrl.
79 75
80 // OAuth2 scopes for the GData WAPI. 76 // OAuth2 scopes for the GData WAPI.
81 extern const char kDocsListScope[]; 77 extern const char kDocsListScope[];
82 extern const char kDriveAppsScope[]; 78 extern const char kDriveAppsScope[];
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); 114 bool IsKnownHostedDocumentMimeType(const std::string& mime_type);
119 115
120 // Returns true if the given file path has an extension corresponding to one of 116 // Returns true if the given file path has an extension corresponding to one of
121 // hosted document types. 117 // hosted document types.
122 bool HasHostedDocumentExtension(const base::FilePath& path); 118 bool HasHostedDocumentExtension(const base::FilePath& path);
123 119
124 } // namespace util 120 } // namespace util
125 } // namespace drive 121 } // namespace drive
126 122
127 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ 123 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_api_service.cc ('k') | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698