diff options
author | achuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-20 01:30:02 +0000 |
---|---|---|
committer | achuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-20 01:30:02 +0000 |
commit | 07a9cf58aabc1e1f5eefe0fb546ec187eaef44a3 (patch) | |
tree | 271b33231daca94214e7da26fa73fc9e62132cc3 /chrome/browser/ui | |
parent | dc31f646fee5f9a5039fb6118b14fd66ba1464d4 (diff) | |
download | chromium_src-07a9cf58aabc1e1f5eefe0fb546ec187eaef44a3.zip chromium_src-07a9cf58aabc1e1f5eefe0fb546ec187eaef44a3.tar.gz chromium_src-07a9cf58aabc1e1f5eefe0fb546ec187eaef44a3.tar.bz2 |
Fix for downloading to default destination drive in incognito mode.
* Rename DownloadPrefs::download_path() to DownloadPrefs::DownloadPath(). Most of the changes are due to this.
* Store Profile* instead of PrefService* in DownloadPrefs.
* Determine if GDataSystemService* is available in DownloadPath() on ChromeOS. If not, use the default download directory.
BUG=137706
TEST=set default download destination to drive on cros. Open an incognito window, click on a link that would cause an automatic download. This should work.
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10805026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/ash/screenshot_taker.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/downloads_dom_handler.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/feedback_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/webui/screenshot_source.cc | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/ui/ash/screenshot_taker.cc b/chrome/browser/ui/ash/screenshot_taker.cc index 12e6bd2..3e9d655 100644 --- a/chrome/browser/ui/ash/screenshot_taker.cc +++ b/chrome/browser/ui/ash/screenshot_taker.cc @@ -153,7 +153,7 @@ void ScreenshotTaker::HandleTakePartialScreenshot( if (is_logged_in) { DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext( ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext()); - screenshot_directory = download_prefs->download_path(); + screenshot_directory = download_prefs->DownloadPath(); } else { if (!file_util::GetTempDir(&screenshot_directory)) { LOG(ERROR) << "Failed to find temporary directory."; diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc index d10d8e6..514ae7a 100644 --- a/chrome/browser/ui/webui/downloads_dom_handler.cc +++ b/chrome/browser/ui/webui/downloads_dom_handler.cc @@ -341,7 +341,7 @@ void DownloadsDOMHandler::HandleClearAll(const ListValue* args) { void DownloadsDOMHandler::HandleOpenDownloadsFolder(const ListValue* args) { CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_OPEN_FOLDER); platform_util::OpenItem( - DownloadPrefs::FromDownloadManager(download_manager_)->download_path()); + DownloadPrefs::FromDownloadManager(download_manager_)->DownloadPath()); } // DownloadsDOMHandler, private: ---------------------------------------------- diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc index 96ea099..83bbe87 100644 --- a/chrome/browser/ui/webui/feedback_ui.cc +++ b/chrome/browser/ui/webui/feedback_ui.cc @@ -98,7 +98,7 @@ void GetSavedScreenshots(std::vector<std::string>* saved_screenshots) { DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext( ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext()); FeedbackUI::GetMostRecentScreenshots( - download_prefs->download_path(), + download_prefs->DownloadPath(), saved_screenshots, kMaxSavedScreenshots); } diff --git a/chrome/browser/ui/webui/screenshot_source.cc b/chrome/browser/ui/webui/screenshot_source.cc index 9a7798f..15d0d57 100644 --- a/chrome/browser/ui/webui/screenshot_source.cc +++ b/chrome/browser/ui/webui/screenshot_source.cc @@ -104,7 +104,7 @@ void ScreenshotSource::SendSavedScreenshot(const std::string& screenshot_path, int64 file_size = 0; DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext( ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext()); - FilePath file = download_prefs->download_path().Append(decoded_filename); + FilePath file = download_prefs->DownloadPath().Append(decoded_filename); if (!file_util::GetFileSize(file, &file_size)) { CacheAndSendScreenshot(screenshot_path, request_id, read_bytes); return; |