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

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

Issue 414203003: Remove unnecessary utilities from drive::util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 6 years, 5 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ConvertFileListToResourceList(const google_apis::FileList& file_list); 102 ConvertFileListToResourceList(const google_apis::FileList& file_list);
103 103
104 // Converts ChangeList to ResourceList. 104 // Converts ChangeList to ResourceList.
105 scoped_ptr<google_apis::ResourceList> 105 scoped_ptr<google_apis::ResourceList>
106 ConvertChangeListToResourceList(const google_apis::ChangeList& change_list); 106 ConvertChangeListToResourceList(const google_apis::ChangeList& change_list);
107 107
108 // Returns the (base-16 encoded) MD5 digest of the file content at |file_path|, 108 // Returns the (base-16 encoded) MD5 digest of the file content at |file_path|,
109 // or an empty string if an error is found. 109 // or an empty string if an error is found.
110 std::string GetMd5Digest(const base::FilePath& file_path); 110 std::string GetMd5Digest(const base::FilePath& file_path);
111 111
112 // The resource ID for the root directory for WAPI is defined in the spec:
113 // https://developers.google.com/google-apps/documents-list/
114 extern const char kWapiRootDirectoryResourceId[];
115
116 // Returns preferred file extension for hosted documents which have given mime 112 // Returns preferred file extension for hosted documents which have given mime
117 // type. If the given mime type is not known as one for hosted documents, 113 // type. If the given mime type is not known as one for hosted documents,
118 // returns empty string. 114 // returns empty string.
119 std::string GetHostedDocumentExtension(const std::string& mime_type); 115 std::string GetHostedDocumentExtension(const std::string& mime_type);
120 116
121 // Returns mime type for hosted documents which have given extension in form
122 // ".xxx". If the given extension is not known as one for hosted documents,
123 // returns empty string.
124 std::string GetHostedDocumentMimeType(const std::string& extension);
125
126 // Returns true if the given mime type is corresponding to one of hosted 117 // Returns true if the given mime type is corresponding to one of hosted
127 // documents. 118 // documents.
128 bool IsHostedDocument(const std::string& mime_type); 119 bool IsHostedDocument(const std::string& mime_type);
129 120
130 // Returns true if the given extension is corresponding to one of hosted 121 // Returns true if the given extension is corresponding to one of hosted
131 // documents. 122 // documents.
132 bool IsHostedDocumentByExtension(const std::string& extension); 123 bool IsHostedDocumentByExtension(const std::string& extension);
133 124
134 } // namespace util 125 } // namespace util
135 } // namespace drive 126 } // namespace drive
136 127
137 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ 128 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/search_metadata_unittest.cc ('k') | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698