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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_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_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Creates a GDoc file with given values. 173 // Creates a GDoc file with given values.
174 // 174 //
175 // GDoc files are used to represent hosted documents on local filesystems. 175 // GDoc files are used to represent hosted documents on local filesystems.
176 // A GDoc file contains a JSON whose content is a URL to view the document and 176 // A GDoc file contains a JSON whose content is a URL to view the document and
177 // a resource ID of the entry. 177 // a resource ID of the entry.
178 bool CreateGDocFile(const base::FilePath& file_path, 178 bool CreateGDocFile(const base::FilePath& file_path,
179 const GURL& url, 179 const GURL& url,
180 const std::string& resource_id); 180 const std::string& resource_id);
181 181
182 // Returns true if |file_path| has a GDoc file extension. (e.g. ".gdoc")
183 bool HasGDocFileExtension(const base::FilePath& file_path);
184
185 // Reads URL from a GDoc file. 182 // Reads URL from a GDoc file.
186 GURL ReadUrlFromGDocFile(const base::FilePath& file_path); 183 GURL ReadUrlFromGDocFile(const base::FilePath& file_path);
187 184
188 // Reads resource ID from a GDoc file. 185 // Reads resource ID from a GDoc file.
189 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path); 186 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path);
190 187
191 // Returns true if Drive is enabled for the given Profile. 188 // Returns true if Drive is enabled for the given Profile.
192 bool IsDriveEnabledForProfile(Profile* profile); 189 bool IsDriveEnabledForProfile(Profile* profile);
193 190
194 // Enum type for describing the current connection status to Drive. 191 // Enum type for describing the current connection status to Drive.
(...skipping 12 matching lines...) Expand all
207 DRIVE_CONNECTED, 204 DRIVE_CONNECTED,
208 }; 205 };
209 206
210 // Returns the Drive connection status for the |profile|. 207 // Returns the Drive connection status for the |profile|.
211 ConnectionStatusType GetDriveConnectionStatus(Profile* profile); 208 ConnectionStatusType GetDriveConnectionStatus(Profile* profile);
212 209
213 } // namespace util 210 } // namespace util
214 } // namespace drive 211 } // namespace drive
215 212
216 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_ 213 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/copy_operation.cc ('k') | chrome/browser/chromeos/drive/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698