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

Unified Diff: chrome/browser/chromeos/file_system_provider/mount_path_util.cc

Issue 258783006: [fsp] Add the getMetadata operation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 8 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
Index: chrome/browser/chromeos/file_system_provider/mount_path_util.cc
diff --git a/chrome/browser/chromeos/file_system_provider/mount_path_util.cc b/chrome/browser/chromeos/file_system_provider/mount_path_util.cc
index ed7016d4223c922af0049e98349bc76cf1e42956..a7a351d233fb5e454994cb5807008e564bc19614 100644
--- a/chrome/browser/chromeos/file_system_provider/mount_path_util.cc
+++ b/chrome/browser/chromeos/file_system_provider/mount_path_util.cc
@@ -16,6 +16,9 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "content/public/browser/browser_thread.h"
+
+using content::BrowserThread;
namespace chromeos {
namespace file_system_provider {
@@ -50,6 +53,8 @@ FileSystemURLParser::~FileSystemURLParser() {
}
bool FileSystemURLParser::Parse() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
if (url_.type() != fileapi::kFileSystemTypeProvided)
return false;
@@ -80,7 +85,7 @@ bool FileSystemURLParser::Parse() {
std::vector<base::FilePath::StringType> components;
url_.virtual_path().GetComponents(&components);
DCHECK_LT(0u, components.size());
- file_path_ = base::FilePath();
+ file_path_ = base::FilePath::FromUTF8Unsafe("/");
for (size_t i = 1; i < components.size(); ++i) {
// TODO(mtomasz): This could be optimized, to avoid unnecessary copies.
file_path_ = file_path_.Append(components[i]);

Powered by Google App Engine
This is Rietveld 408576698