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

Issue 9809011: GData save package support with MHTML. (Closed)

Created:
8 years, 9 months ago by achuithb
Modified:
8 years, 9 months ago
CC:
chromium-reviews, achuith+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org, rdsmith+dwatch_chromium.org
Visibility:
Public.

Description

GData save package support with MHTML. * Introduce SavePackageFilePickerChromeOS, which derives from SavePackageFilePicker. * For gdata targets, we save the selected path, create a temporary mhtml file using WebContents::GenerateMHTML, and call GDataFileSystem::TransferFile to transfer the file to gdata. * For non-gdata targets, we just generate the mhtml file in place. * DownloadObserver::GetGDataTempDownloadPath is a static helper method to create a temporary gdata download file, used by SavePackageFilePickerChromeOS and DownloadFilePickerChromeOS. BUG=chromium-os:28210 TEST=Go to a web page, use Save As, or ctrl-s to save a page to docs. TBR=rdsmith@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=129115

Patch Set 1 #

Patch Set 2 : #

Total comments: 16

Patch Set 3 : rebase + handle some nits #

Patch Set 4 : more nits #

Total comments: 9

Patch Set 5 : #

Patch Set 6 : break inheritance from SavePackageFilePicker #

Patch Set 7 : Add comments and TODOs #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -31 lines) Patch
M chrome/browser/chromeos/gdata/gdata_download_observer.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_download_observer.cc View 1 2 3 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 2 3 4 5 6 2 chunks +8 lines, -3 lines 1 comment Download
M chrome/browser/download/download_file_picker_chromeos.cc View 1 2 2 chunks +9 lines, -27 lines 0 comments Download
A chrome/browser/download/save_package_file_picker_chromeos.h View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/download/save_package_file_picker_chromeos.cc View 1 2 3 4 5 1 chunk +124 lines, -0 lines 1 comment Download
M chrome/chrome_browser.gypi View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/download/save_package.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/download_manager_delegate.h View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
achuithb
Much smaller in scope. GDataFileSystem::TransferFile seems to be currently broken in some fashion so I'm ...
8 years, 9 months ago (2012-03-26 09:27:13 UTC) #1
zel
lgtm few nits below http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc File chrome/browser/download/save_package_file_picker_chromeos.cc (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc#newcode87 chrome/browser/download/save_package_file_picker_chromeos.cc:87: GetGDataFileSystem()->TransferFile(src_path, selected_path_, if (!GetGDataFileSystem()) return; ...
8 years, 9 months ago (2012-03-26 16:13:14 UTC) #2
Randy Smith (Not in Mondays)
High level question: Would it be possible to allow for MHTML saving from the general ...
8 years, 9 months ago (2012-03-26 16:19:41 UTC) #3
Randy Smith (Not in Mondays)
One other high level suggestion (not a request, as I'm not certain that my sense ...
8 years, 9 months ago (2012-03-26 16:24:00 UTC) #4
zel
http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc File chrome/browser/download/save_package_file_picker_chromeos.cc (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc#newcode59 chrome/browser/download/save_package_file_picker_chromeos.cc:59: SavePackageFilePicker::FileSelected(path, index, params); actually, on ChromeOS we probably want ...
8 years, 9 months ago (2012-03-26 16:33:41 UTC) #5
asanka
http://codereview.chromium.org/9809011/diff/1010/chrome/browser/chromeos/gdata/gdata_download_observer.cc File chrome/browser/chromeos/gdata/gdata_download_observer.cc (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/chromeos/gdata/gdata_download_observer.cc#newcode159 chrome/browser/chromeos/gdata/gdata_download_observer.cc:159: void GDataDownloadObserver::GetGDataTempDownloadPath( // static http://codereview.chromium.org/9809011/diff/1010/chrome/browser/chromeos/gdata/gdata_download_observer.h File chrome/browser/chromeos/gdata/gdata_download_observer.h (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/chromeos/gdata/gdata_download_observer.h#newcode57 ...
8 years, 9 months ago (2012-03-26 16:50:13 UTC) #6
Randy Smith (Not in Mondays)
http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc File chrome/browser/download/save_package_file_picker_chromeos.cc (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc#newcode29 chrome/browser/download/save_package_file_picker_chromeos.cc:29: can_save_as_complete, download_prefs, callback), I apologize, as there's probably something ...
8 years, 9 months ago (2012-03-26 17:13:02 UTC) #7
Randy Smith (Not in Mondays)
Offline conversation quick summary: Achuith and I talked and explored design alternatives to this CL. ...
8 years, 9 months ago (2012-03-26 19:26:56 UTC) #8
achuithb
http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc File chrome/browser/download/save_package_file_picker_chromeos.cc (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/download/save_package_file_picker_chromeos.cc#newcode29 chrome/browser/download/save_package_file_picker_chromeos.cc:29: can_save_as_complete, download_prefs, callback), On 2012/03/26 17:13:02, rdsmith wrote: > ...
8 years, 9 months ago (2012-03-26 19:44:44 UTC) #9
achuithb
http://codereview.chromium.org/9809011/diff/1010/chrome/browser/chromeos/gdata/gdata_download_observer.cc File chrome/browser/chromeos/gdata/gdata_download_observer.cc (right): http://codereview.chromium.org/9809011/diff/1010/chrome/browser/chromeos/gdata/gdata_download_observer.cc#newcode159 chrome/browser/chromeos/gdata/gdata_download_observer.cc:159: void GDataDownloadObserver::GetGDataTempDownloadPath( On 2012/03/26 16:50:14, asanka wrote: > // ...
8 years, 9 months ago (2012-03-26 19:51:39 UTC) #10
Randy Smith (Not in Mondays)
My apologies about all the comment requests, but this CL is messing with the interface ...
8 years, 9 months ago (2012-03-26 21:08:33 UTC) #11
achuithb
Going to remove the inheritance relationship between SavePackageFilePicker and SavePackageFilePickerChromeOS next, and also add the ...
8 years, 9 months ago (2012-03-26 21:35:53 UTC) #12
achuithb
Last patch didn't have a comment (sorry), but the major item was having mhtml files ...
8 years, 9 months ago (2012-03-26 21:37:46 UTC) #13
achuithb
SavePackageFilePickerChromeOS no longer inherits from SavePackageFilePicker. As a result save_package_file_picker.h is no longer part of ...
8 years, 9 months ago (2012-03-26 22:56:01 UTC) #14
achuithb
All the tests pass. This CL is ready for review. PTAL Zel, Randy and Asanka.
8 years, 9 months ago (2012-03-27 00:25:51 UTC) #15
zel
lgtm
8 years, 9 months ago (2012-03-27 00:55:20 UTC) #16
asanka
LGTM. Coordinate with https://chromiumcodereview.appspot.com/9854011/ because there will be conflicts. http://codereview.chromium.org/9809011/diff/10009/chrome/browser/download/save_package_file_picker_chromeos.cc File chrome/browser/download/save_package_file_picker_chromeos.cc (right): http://codereview.chromium.org/9809011/diff/10009/chrome/browser/download/save_package_file_picker_chromeos.cc#newcode87 chrome/browser/download/save_package_file_picker_chromeos.cc:87: ...
8 years, 9 months ago (2012-03-27 01:54:33 UTC) #17
Randy Smith (Not in Mondays)
8 years, 9 months ago (2012-03-27 17:15:46 UTC) #18
LGTM; thanks!

http://codereview.chromium.org/9809011/diff/10009/chrome/browser/download/chr...
File chrome/browser/download/chrome_download_manager_delegate.cc (right):

http://codereview.chromium.org/9809011/diff/10009/chrome/browser/download/chr...
chrome/browser/download/chrome_download_manager_delegate.cc:322: // Note that
we're ignoring the callback here. TODO(achuith): Fix this.
A little bit more information.  Maybe "... ignoring the callback here; the
SavePacakgeFilePickerChromeOS completes the save operation itself."?

Powered by Google App Engine
This is Rietveld 408576698