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

Issue 7373004: Move the save file code from chrome to content. This is just a file move so the DEPS in content\b... (Closed)

Created:
9 years, 5 months ago by jam
Modified:
9 years, 5 months ago
CC:
chromium-reviews, Avi (use Gerrit), kkania, brettw-cc_chromium.org, achuith+watch_chromium.org, joi+watch-content_chromium.org, rginda+watch_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr., jshin+watch_chromium.org
Visibility:
Public.

Description

Move the save file code from chrome to content. This is just a file move so the DEPS in content\browser\download is very permissive for now. The one exception is save_package.cc, where I had to split off the usage of SelectFileDialog because the code depended on grit which can't be used in content (circular dependencies in gyp). TBR=rdsmith BUG=82782 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92623

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -4463 lines) Patch
M chrome/browser/automation/automation_provider.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/automation/automation_provider_observers.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/browser_encoding_uitest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process_impl.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 chunks +10 lines, -0 lines 0 comments Download
D chrome/browser/download/base_file.h View 1 chunk +0 lines, -108 lines 0 comments Download
D chrome/browser/download/base_file.cc View 1 chunk +0 lines, -248 lines 0 comments Download
D chrome/browser/download/base_file_unittest.cc View 1 chunk +0 lines, -230 lines 0 comments Download
M chrome/browser/download/download_file.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_item_model.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_prefs.cc View 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/download/save_file.h View 1 chunk +0 lines, -42 lines 0 comments Download
D chrome/browser/download/save_file.cc View 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/browser/download/save_file_manager.h View 1 chunk +0 lines, -255 lines 0 comments Download
D chrome/browser/download/save_file_manager.cc View 1 chunk +0 lines, -541 lines 0 comments Download
D chrome/browser/download/save_item.h View 1 chunk +0 lines, -112 lines 0 comments Download
D chrome/browser/download/save_item.cc View 1 chunk +0 lines, -130 lines 0 comments Download
D chrome/browser/download/save_package.h View 1 chunk +0 lines, -327 lines 0 comments Download
D chrome/browser/download/save_package.cc View 1 chunk +0 lines, -1476 lines 0 comments Download
A chrome/browser/download/save_package_file_picker.h View 1 1 chunk +40 lines, -0 lines 1 comment Download
A chrome/browser/download/save_package_file_picker.cc View 1 2 1 chunk +165 lines, -0 lines 1 comment Download
D chrome/browser/download/save_package_unittest.cc View 1 chunk +0 lines, -426 lines 0 comments Download
M chrome/browser/download/save_page_uitest.cc View 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/download/save_types.h View 1 chunk +0 lines, -68 lines 0 comments Download
D chrome/browser/download/save_types.cc View 1 chunk +0 lines, -31 lines 0 comments Download
M chrome/browser/renderer_host/DEPS View 1 chunk +1 line, -3 lines 0 comments Download
D chrome/browser/renderer_host/save_file_resource_handler.h View 1 chunk +0 lines, -79 lines 0 comments Download
D chrome/browser/renderer_host/save_file_resource_handler.cc View 1 chunk +0 lines, -119 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/applescript/tab_applescript.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/download/download_tab_helper.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 3 chunks +2 lines, -14 lines 0 comments Download
M chrome/chrome_tests.gypi View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/automation/tab_proxy.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/DEPS View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/content_browser_client.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
A + content/browser/download/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + content/browser/download/base_file.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/browser/download/base_file.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/browser/download/base_file_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/browser/download/save_file.h View 2 chunks +5 lines, -5 lines 0 comments Download
A + content/browser/download/save_file.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/browser/download/save_file_manager.h View 3 chunks +4 lines, -4 lines 0 comments Download
A + content/browser/download/save_file_manager.cc View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/browser/download/save_file_resource_handler.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/browser/download/save_file_resource_handler.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A + content/browser/download/save_item.h View 2 chunks +4 lines, -4 lines 0 comments Download
A + content/browser/download/save_item.cc View 1 chunk +4 lines, -4 lines 0 comments Download
A + content/browser/download/save_package.h View 1 9 chunks +12 lines, -18 lines 0 comments Download
A + content/browser/download/save_package.cc View 1 11 chunks +17 lines, -154 lines 0 comments Download
A + content/browser/download/save_package_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/browser/download/save_types.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/browser/download/save_types.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/mock_content_browser_client.h View 1 1 chunk +5 lines, -2 lines 0 comments Download
M content/browser/mock_content_browser_client.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/content_browser.gypi View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jam
9 years, 5 months ago (2011-07-14 20:45:18 UTC) #1
jam
btw the one behavioral change is that SavePackageFilePicker (new class that I added in chrome) ...
9 years, 5 months ago (2011-07-14 22:18:37 UTC) #2
Randy Smith (Not in Mondays)
Two comments beyond the below: * Is there no way to move save_page_uitest.cc? I think ...
9 years, 5 months ago (2011-07-15 17:16:18 UTC) #3
jam
On 2011/07/15 17:16:18, rdsmith wrote: > Two comments beyond the below: > * Is there ...
9 years, 5 months ago (2011-07-15 18:02:10 UTC) #4
jam
9 years, 5 months ago (2011-07-15 18:24:07 UTC) #5
On 2011/07/15 18:02:10, John Abd-El-Malek wrote:
> On 2011/07/15 17:16:18, rdsmith wrote:
> > Two comments beyond the below:
> > * Is there no way to move save_page_uitest.cc?  I think it's a real win to
> have
> > test code right next to the code it's testing.  
> 
> Yeah I would like to move it as well, the problem is that it and the
> browser_test depend on chrome UI. if we were to move them to content, we would
> have to open up the deps file to these chrome UI, and other non-test code
might
> use it which would be a problem.
> 
> > * I'm worried about leaks.  I'm not at all sure we're guaranteed to get
> > callbacks from the file selection dialog during shutdown, and if we don't,
> we've
> > leaked both both SavePackageFilePicker and SavePackage.  If you re-routed
> things
> > to use the ListenerDestroyed() pattern, how much of a hassle would it be?
> 
> Generally, memory leaks at shutdown are ok. Does SavePackage do anything to
the
> disk in its destructor?
> 
> The reason I didn't use ListenerDestroyed is that then we'd have to create an
> interface around the file picker so that content can know about it, and I was
> too lazy to add it :) We can alternatively make SavePackage support weak ptr,
> and have SavePackageFilePicker use that. Before I do the work, I'd just like
to
> know if we need it?

ok I just looked at SavePackage's destructor, and we do want it to run. Since
I'm not sure if the SavePackageFilePicker's destructor will run on all
platforms, I'll figure out a way to do this and send you a cl, thanks.
> 
> > 
> >
>
http://codereview.chromium.org/7373004/diff/4081/chrome/browser/download/save...
> > File chrome/browser/download/save_package_file_picker.cc (right):
> > 
> >
>
http://codereview.chromium.org/7373004/diff/4081/chrome/browser/download/save...
> > chrome/browser/download/save_package_file_picker.cc:56: //
> > GetSaveInfo->CreateDirectoryOnFileThread->ContinueGetSaveInfo.
> > Could you specify in this comment both that you're talking about SavePackage
> > methods, and why it's safe to use the save_package argument after the
> > TabContents has been destroyed even though that generally results in
> SavePackage
> > destruction?  (The refcount only occurs in the constructor).
> 
> I actually just moved this comment over when moving the code.
> 
> > 
> >
>
http://codereview.chromium.org/7373004/diff/4081/chrome/browser/download/save...
> > File chrome/browser/download/save_package_file_picker.h (right):
> > 
> >
>
http://codereview.chromium.org/7373004/diff/4081/chrome/browser/download/save...
> > chrome/browser/download/save_package_file_picker.h:35:
> > scoped_refptr<SelectFileDialog> select_file_dialog_;
> > You remarked in a Rietveld comment that this wasn't necessary.
> 
> Which comment are you referring to?
> 
> >  Could you also
> > document that here?  At some point we're going to be doing refactoring in
this
> > code, and it would be good to hold onto the possibility of dropping the
> pointer
> > (with appropriate DCHECKs) if it isn't needed.

Powered by Google App Engine
This is Rietveld 408576698