OLD | NEW |
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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 void Browser::FileSelectedWithExtraInfo( | 1786 void Browser::FileSelectedWithExtraInfo( |
1787 const ui::SelectedFileInfo& file_info, | 1787 const ui::SelectedFileInfo& file_info, |
1788 int index, | 1788 int index, |
1789 void* params) { | 1789 void* params) { |
1790 profile_->set_last_selected_directory(file_info.file_path.DirName()); | 1790 profile_->set_last_selected_directory(file_info.file_path.DirName()); |
1791 | 1791 |
1792 const FilePath& path = file_info.local_path; | 1792 const FilePath& path = file_info.local_path; |
1793 GURL file_url = net::FilePathToFileURL(path); | 1793 GURL file_url = net::FilePathToFileURL(path); |
1794 | 1794 |
1795 #if defined(OS_CHROMEOS) | 1795 #if defined(OS_CHROMEOS) |
1796 gdata::util::ModifyGDataFileResourceUrl(profile_, path, &file_url); | 1796 gdata::util::ModifyDriveFileResourceUrl(profile_, path, &file_url); |
1797 #endif | 1797 #endif |
1798 | 1798 |
1799 if (file_url.is_empty()) | 1799 if (file_url.is_empty()) |
1800 return; | 1800 return; |
1801 | 1801 |
1802 OpenURL(OpenURLParams( | 1802 OpenURL(OpenURLParams( |
1803 file_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, | 1803 file_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, |
1804 false)); | 1804 false)); |
1805 } | 1805 } |
1806 | 1806 |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2298 if (contents && !allow_js_access) { | 2298 if (contents && !allow_js_access) { |
2299 contents->web_contents()->GetController().LoadURL( | 2299 contents->web_contents()->GetController().LoadURL( |
2300 target_url, | 2300 target_url, |
2301 content::Referrer(), | 2301 content::Referrer(), |
2302 content::PAGE_TRANSITION_LINK, | 2302 content::PAGE_TRANSITION_LINK, |
2303 std::string()); // No extra headers. | 2303 std::string()); // No extra headers. |
2304 } | 2304 } |
2305 | 2305 |
2306 return contents != NULL; | 2306 return contents != NULL; |
2307 } | 2307 } |
OLD | NEW |