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

Side by Side Diff: chrome/browser/download/save_package_file_picker_chromeos.cc

Issue 10820034: Remove redirection header and add "ui::" before all SelectFileDialog usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reuploading for different try run. Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/download/save_package_file_picker_chromeos.h" 5 #include "chrome/browser/download/save_package_file_picker_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/i18n/file_util_icu.h" 9 #include "base/i18n/file_util_icu.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 25 matching lines...) Expand all
36 36
37 } // anonymous namespace 37 } // anonymous namespace
38 38
39 SavePackageFilePickerChromeOS::SavePackageFilePickerChromeOS( 39 SavePackageFilePickerChromeOS::SavePackageFilePickerChromeOS(
40 content::WebContents* web_contents, 40 content::WebContents* web_contents,
41 const FilePath& suggested_path, 41 const FilePath& suggested_path,
42 const content::SavePackagePathPickedCallback& callback) 42 const content::SavePackagePathPickedCallback& callback)
43 : content::WebContentsObserver(web_contents), 43 : content::WebContentsObserver(web_contents),
44 callback_(callback) { 44 callback_(callback) {
45 if (g_should_prompt_for_filename) { 45 if (g_should_prompt_for_filename) {
46 select_file_dialog_ = SelectFileDialog::Create( 46 select_file_dialog_ = ui::SelectFileDialog::Create(
47 this, new ChromeSelectFilePolicy(web_contents)); 47 this, new ChromeSelectFilePolicy(web_contents));
48 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE, 48 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE,
49 string16(), 49 string16(),
50 suggested_path.ReplaceExtension("mhtml"), 50 suggested_path.ReplaceExtension("mhtml"),
51 NULL, 51 NULL,
52 0, 52 0,
53 "mhtml", 53 "mhtml",
54 platform_util::GetTopLevel( 54 platform_util::GetTopLevel(
55 web_contents->GetNativeView()), 55 web_contents->GetNativeView()),
56 NULL); 56 NULL);
57 } else { 57 } else {
58 FileSelected(suggested_path.ReplaceExtension("mhtml"), 0, NULL); 58 FileSelected(suggested_path.ReplaceExtension("mhtml"), 0, NULL);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } else { 102 } else {
103 callback_.Run(selected_path, content::SAVE_PAGE_TYPE_AS_MHTML, 103 callback_.Run(selected_path, content::SAVE_PAGE_TYPE_AS_MHTML,
104 content::SavePackageDownloadCreatedCallback()); 104 content::SavePackageDownloadCreatedCallback());
105 } 105 }
106 delete this; 106 delete this;
107 } 107 }
108 108
109 void SavePackageFilePickerChromeOS::FileSelectionCanceled(void* params) { 109 void SavePackageFilePickerChromeOS::FileSelectionCanceled(void* params) {
110 delete this; 110 delete this;
111 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698