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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc

Issue 450913002: Video Player: Fix the private API error in Debug build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/cast/media_manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index b699710617818e99ebf6d161ecc9de6f47be2120..bd8d719d580bfa0678d5fb5d8be36fb8a2d4a8b5 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -918,7 +918,11 @@ bool FileBrowserPrivateGetDownloadUrlFunction::RunAsync() {
const base::FilePath path = file_manager::util::GetLocalPathFromURL(
render_view_host(), GetProfile(), GURL(params->url));
- DCHECK(drive::util::IsUnderDriveMountPoint(path));
+ if (!drive::util::IsUnderDriveMountPoint(path)) {
+ SetError("The given file is not in Drive.");
+ SetResult(new base::StringValue("")); // Intentionally returns a blank.
+ return false;
+ }
base::FilePath file_path = drive::util::ExtractDrivePath(path);
file_system->GetResourceEntry(
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/cast/media_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698