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

Unified Diff: chrome/browser/chromeos/gdata/gdata_util.cc

Issue 10827068: gdata: Fix "save as pdf" to work on Google Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add mock method. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_util.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_util.cc b/chrome/browser/chromeos/gdata/gdata_util.cc
index fe764c9ea56c16d80185a3bde161038ae20ee606..f508e14ca9f8f68ea9f7353adb7f242815103872 100644
--- a/chrome/browser/chromeos/gdata/gdata_util.cc
+++ b/chrome/browser/chromeos/gdata/gdata_util.cc
@@ -579,5 +579,20 @@ std::string FormatTimeAsString(const base::Time& time) {
exploded.hour, exploded.minute, exploded.second, exploded.millisecond);
}
+void PrepareWritableFileAndRun(Profile* profile,
+ const FilePath& path,
+ const OpenFileCallback& callback) {
+ if (IsUnderGDataMountPoint(path)) {
+ FilePath remote_path(ExtractGDataPath(path));
+ GetGDataFileSystem(profile)->PrepareWritableFileAndRun(remote_path,
+ callback);
+ } else {
+ if (!callback.is_null()) {
+ content::BrowserThread::GetBlockingPool()->PostTask(
+ FROM_HERE, base::Bind(callback, GDATA_FILE_OK, path));
+ }
+ }
+}
+
} // namespace util
} // namespace gdata

Powered by Google App Engine
This is Rietveld 408576698