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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 83002: download filename fix (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include "base/file_version_info.h" 7 #include "base/file_version_info.h"
8 #include "base/process_util.h" 8 #include "base/process_util.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 last_javascript_message_dismissal_ = base::TimeTicks::Now(); 1084 last_javascript_message_dismissal_ = base::TimeTicks::Now();
1085 render_manager_.OnJavaScriptMessageBoxClosed(reply_msg, success, prompt); 1085 render_manager_.OnJavaScriptMessageBoxClosed(reply_msg, success, prompt);
1086 } 1086 }
1087 1087
1088 void TabContents::OnSavePage() { 1088 void TabContents::OnSavePage() {
1089 // If we can not save the page, try to download it. 1089 // If we can not save the page, try to download it.
1090 if (!SavePackage::IsSavableContents(contents_mime_type())) { 1090 if (!SavePackage::IsSavableContents(contents_mime_type())) {
1091 DownloadManager* dlm = profile()->GetDownloadManager(); 1091 DownloadManager* dlm = profile()->GetDownloadManager();
1092 const GURL& current_page_url = GetURL(); 1092 const GURL& current_page_url = GetURL();
1093 if (dlm && current_page_url.is_valid()) 1093 if (dlm && current_page_url.is_valid())
1094 dlm->DownloadUrl(current_page_url, GURL(), AsWC(this)); 1094 dlm->DownloadUrl(current_page_url, GURL(), "", AsWC(this));
1095 return; 1095 return;
1096 } 1096 }
1097 1097
1098 Stop(); 1098 Stop();
1099 1099
1100 // Create the save package and possibly prompt the user for the name to save 1100 // Create the save package and possibly prompt the user for the name to save
1101 // the page as. The user prompt is an asynchronous operation that runs on 1101 // the page as. The user prompt is an asynchronous operation that runs on
1102 // another thread. 1102 // another thread.
1103 save_package_ = new SavePackage(AsWC(this)); 1103 save_package_ = new SavePackage(AsWC(this));
1104 save_package_->GetSaveInfo(); 1104 save_package_->GetSaveInfo();
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 NavigationController::LoadCommittedDetails& committed_details = 2442 NavigationController::LoadCommittedDetails& committed_details =
2443 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2443 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2444 ExpireInfoBars(committed_details); 2444 ExpireInfoBars(committed_details);
2445 break; 2445 break;
2446 } 2446 }
2447 2447
2448 default: 2448 default:
2449 NOTREACHED(); 2449 NOTREACHED();
2450 } 2450 }
2451 } 2451 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/browser/tab_contents/tab_contents_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698