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

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

Issue 416223003: Unify HasGDocFileExtension and IsHostedDocumentByExtentoin. (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
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 // Returns mime type for hosted documents which have given extension in form 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, 122 // ".xxx". If the given extension is not known as one for hosted documents,
123 // returns empty string. 123 // returns empty string.
124 std::string GetHostedDocumentMimeType(const std::string& extension); 124 std::string GetHostedDocumentMimeType(const std::string& extension);
125 125
126 // Returns true if the given mime type is corresponding to one of hosted 126 // Returns true if the given mime type is corresponding to one of hosted
127 // documents. 127 // documents.
128 bool IsHostedDocument(const std::string& mime_type); 128 bool IsHostedDocument(const std::string& mime_type);
129 129
130 // Returns true if the given extension is corresponding to one of hosted 130 // Returns true if the given file path has an extension corresponding to one of
131 // documents. 131 // hosted document types.
132 bool IsHostedDocumentByExtension(const std::string& extension); 132 bool HasHostedDocumentExtension(const base::FilePath& path);
133 133
134 } // namespace util 134 } // namespace util
135 } // namespace drive 135 } // namespace drive
136 136
137 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ 137 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/open_with_browser.cc ('k') | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698