Chromium Code Reviews| 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..b925077dea0aa80fcde8206d4433b270b3b042ce 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(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
|
kinaba
2014/04/30 07:55:03
You can also use the recently introduced macro:
DC
mtomasz
2014/04/30 09:18:24
Cool! Done.
|
| + |
| 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("/"); |
|
kinaba
2014/04/30 07:55:03
FilePath::FromUTF8Unsafe or FILE_PATH_LITERAL("/")
mtomasz
2014/04/30 09:18:24
Done.
|
| 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]); |