diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 20:49:52 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 20:49:52 +0000 |
commit | a0ce3284a4fb3aee664c8ad998fb6c4d4b8d0080 (patch) | |
tree | 2a160a7305bbf6ef8f02249fa2c86af28676263c /chrome/browser/automation | |
parent | dcc592a99ae6a563a200cf253d1d3856c511582d (diff) | |
download | chromium_src-a0ce3284a4fb3aee664c8ad998fb6c4d4b8d0080.zip chromium_src-a0ce3284a4fb3aee664c8ad998fb6c4d4b8d0080.tar.gz chromium_src-a0ce3284a4fb3aee664c8ad998fb6c4d4b8d0080.tar.bz2 |
Move simple download calls to chrome code to use ContentBrowserClient interface.
BUG=82782
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97477
Review URL: http://codereview.chromium.org/7670086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index dbbd3a4..d4738f5 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -3019,8 +3019,12 @@ void TestingAutomationProvider::PerformActionOnDownload( this, reply_message, true)); selected_item->OpenDownload(); } else if (action == "toggle_open_files_like_this") { - selected_item->OpenFilesBasedOnExtension( - !selected_item->ShouldOpenFileBasedOnExtension()); + DownloadPrefs* prefs = selected_item->download_manager()->download_prefs(); + FilePath path = selected_item->GetUserVerifiedFilePath(); + if (!selected_item->ShouldOpenFileBasedOnExtension()) + prefs->EnableAutoOpenBasedOnExtension(path); + else + prefs->DisableAutoOpenBasedOnExtension(path); AutomationJSONReply(this, reply_message).SendSuccess(NULL); } else if (action == "remove") { download_manager->AddObserver( |