Commit 1f858421 authored by Weilun Shi's avatar Weilun Shi Committed by Commit Bot

[NTP] Upload file from the most recent directory

By setting the last selected directory to the user profile after the
user select a custom background image, the user can go to the last
directory instead of going to "This PC" or home directory.

Bugs: 867758
Change-Id: I6b6fb1296a2f1ffb60148522cdd25a1f027f630e
Reviewed-on: https://chromium-review.googlesource.com/1162712Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Commit-Queue: Weilun Shi <sweilun@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580921}
parent a983489b
...@@ -405,8 +405,10 @@ void SearchTabHelper::OnSetCustomBackgroundURLWithAttributions( ...@@ -405,8 +405,10 @@ void SearchTabHelper::OnSetCustomBackgroundURLWithAttributions(
void SearchTabHelper::FileSelected(const base::FilePath& path, void SearchTabHelper::FileSelected(const base::FilePath& path,
int index, int index,
void* params) { void* params) {
if (instant_service_) if (instant_service_) {
profile()->set_last_selected_directory(path.DirName());
instant_service_->SelectLocalBackgroundImage(path); instant_service_->SelectLocalBackgroundImage(path);
}
select_file_dialog_ = nullptr; select_file_dialog_ = nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment