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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager_util.cc

Issue 12674003: Fix playing video files with hash in the filename in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/chromeos/extensions/file_manager_util.h" 4 #include "chrome/browser/chromeos/extensions/file_manager_util.h"
5 5
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 GURL* url) { 610 GURL* url) {
611 GURL origin_url = Extension::GetBaseURLFromExtensionId(extension_id); 611 GURL origin_url = Extension::GetBaseURLFromExtensionId(extension_id);
612 base::FilePath virtual_path; 612 base::FilePath virtual_path;
613 if (!ConvertFileToRelativeFileSystemPath(profile, extension_id, 613 if (!ConvertFileToRelativeFileSystemPath(profile, extension_id,
614 full_file_path, &virtual_path)) { 614 full_file_path, &virtual_path)) {
615 return false; 615 return false;
616 } 616 }
617 617
618 GURL base_url = fileapi::GetFileSystemRootURI(origin_url, 618 GURL base_url = fileapi::GetFileSystemRootURI(origin_url,
619 fileapi::kFileSystemTypeExternal); 619 fileapi::kFileSystemTypeExternal);
620 *url = GURL(base_url.spec() + virtual_path.value()); 620 *url = GURL(base_url.spec() +
621 net::EscapeUrlEncodedData(virtual_path.value(), false));
hashimoto 2013/03/08 07:12:47 boolean arguments are hard to read. (see "nullptr/
mtomasz 2013/03/11 03:54:29 Added comments. Done.
621 return true; 622 return true;
622 } 623 }
623 624
624 bool ConvertFileToRelativeFileSystemPath( 625 bool ConvertFileToRelativeFileSystemPath(
625 Profile* profile, 626 Profile* profile,
626 const std::string& extension_id, 627 const std::string& extension_id,
627 const base::FilePath& full_file_path, 628 const base::FilePath& full_file_path,
628 base::FilePath* virtual_path) { 629 base::FilePath* virtual_path) {
629 ExtensionService* service = 630 ExtensionService* service =
630 extensions::ExtensionSystem::Get(profile)->extension_service(); 631 extensions::ExtensionSystem::Get(profile)->extension_service();
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 for (google_apis::OperationProgressStatusList::const_iterator iter = 968 for (google_apis::OperationProgressStatusList::const_iterator iter =
968 list.begin(); 969 list.begin();
969 iter != list.end(); ++iter) { 970 iter != list.end(); ++iter) {
970 result_list->Append( 971 result_list->Append(
971 ProgessStatusToDictionaryValue(profile, extension_id, *iter)); 972 ProgessStatusToDictionaryValue(profile, extension_id, *iter));
972 } 973 }
973 return result_list.release(); 974 return result_list.release();
974 } 975 }
975 976
976 } // namespace file_manager_util 977 } // namespace file_manager_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698