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

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

Issue 9809011: GData save package support with MHTML. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add comments and TODOs Created 8 years, 9 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_download_observer.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_download_observer.cc (revision 128956)
+++ chrome/browser/chromeos/gdata/gdata_download_observer.cc (working copy)
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/gdata/gdata_download_observer.h"
+#include "base/file_util.h"
#include "chrome/browser/chromeos/gdata/gdata_uploader.h"
#include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
@@ -153,6 +154,20 @@
return -1;
}
+// |gdata_tmp_download_path| is set to a temporary local download path in
+// ~/GCache/v1/tmp/downloads/
+// static
+void GDataDownloadObserver::GetGDataTempDownloadPath(
+ const FilePath& gdata_tmp_download_dir,
+ FilePath* gdata_tmp_download_path) {
+ bool created = file_util::CreateDirectory(gdata_tmp_download_dir);
+ DCHECK(created) << "Can not create temp download directory at "
+ << gdata_tmp_download_dir.value();
+ created = file_util::CreateTemporaryFileInDir(gdata_tmp_download_dir,
+ gdata_tmp_download_path);
+ DCHECK(created) << "Temporary download file creation failed";
+}
+
void GDataDownloadObserver::ManagerGoingDown(
DownloadManager* download_manager) {
download_manager->RemoveObserver(this);

Powered by Google App Engine
This is Rietveld 408576698