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

Unified Diff: chrome/browser/chromeos/file_manager/file_browser_handlers.cc

Issue 172113002: Fix crash when .mhtml/.pdf files are opened from download shelf on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/file_browser_handlers.cc
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index eef6bd75850ff8e8493ed0f0236b7325bd61c239..2cb3ecb5b3e387f99dfb4a264efa15c8af6c04a7 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -480,9 +480,11 @@ bool ExecuteFileBrowserHandler(
// files to be directly opened with the browser.
if (ShouldBeOpenedWithBrowser(extension->id(), action_id)) {
const bool result = OpenFilesWithBrowser(profile, file_urls);
- done.Run(result
- ? extensions::api::file_browser_private::TASK_RESULT_OPENED
- : extensions::api::file_browser_private::TASK_RESULT_FAILED);
+ if (!done.is_null()) {
+ done.Run(result
+ ? extensions::api::file_browser_private::TASK_RESULT_OPENED
+ : extensions::api::file_browser_private::TASK_RESULT_FAILED);
+ }
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698