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

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

Issue 881723002: Remove google_apis::ResourceEntry and related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | 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"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // (e.g. dog cat => fullText contains 'dog' and fullText contains 'cat') 53 // (e.g. dog cat => fullText contains 'dog' and fullText contains 'cat')
54 // Exclusion query (e.g. -cat => not fullText contains 'cat'). 54 // Exclusion query (e.g. -cat => not fullText contains 'cat').
55 // Quoted query (e.g. "dog cat" => fullText contains 'dog cat'). 55 // Quoted query (e.g. "dog cat" => fullText contains 'dog cat').
56 // See also: https://developers.google.com/drive/search-parameters 56 // See also: https://developers.google.com/drive/search-parameters
57 std::string TranslateQuery(const std::string& original_query); 57 std::string TranslateQuery(const std::string& original_query);
58 58
59 // If |resource_id| is in the old resource ID format used by WAPI, converts it 59 // If |resource_id| is in the old resource ID format used by WAPI, converts it
60 // into the new format. 60 // into the new format.
61 std::string CanonicalizeResourceId(const std::string& resource_id); 61 std::string CanonicalizeResourceId(const std::string& resource_id);
62 62
63 // Converts FileResource to ResourceEntry.
64 scoped_ptr<google_apis::ResourceEntry>
65 ConvertFileResourceToResourceEntry(
66 const google_apis::FileResource& file_resource);
67
68 // Returns the (base-16 encoded) MD5 digest of the file content at |file_path|, 63 // Returns the (base-16 encoded) MD5 digest of the file content at |file_path|,
69 // or an empty string if an error is found. 64 // or an empty string if an error is found.
70 std::string GetMd5Digest(const base::FilePath& file_path); 65 std::string GetMd5Digest(const base::FilePath& file_path);
71 66
72 // Returns preferred file extension for hosted documents which have given mime 67 // Returns preferred file extension for hosted documents which have given mime
73 // type. 68 // type.
74 std::string GetHostedDocumentExtension(const std::string& mime_type); 69 std::string GetHostedDocumentExtension(const std::string& mime_type);
75 70
76 // Returns true if the given mime type is corresponding to one of known hosted 71 // Returns true if the given mime type is corresponding to one of known hosted
77 // document types. 72 // document types.
78 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); 73 bool IsKnownHostedDocumentMimeType(const std::string& mime_type);
79 74
80 // Returns true if the given file path has an extension corresponding to one of 75 // Returns true if the given file path has an extension corresponding to one of
81 // hosted document types. 76 // hosted document types.
82 bool HasHostedDocumentExtension(const base::FilePath& path); 77 bool HasHostedDocumentExtension(const base::FilePath& path);
83 78
84 } // namespace util 79 } // namespace util
85 } // namespace drive 80 } // namespace drive
86 81
87 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ 82 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698