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

Unified Diff: components/filesystem/util.cc

Issue 2492283002: Mojo C++ bindings: switch components/filesystem mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month 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 | « components/filesystem/util.h ('k') | components/leveldb/env_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/util.cc
diff --git a/components/filesystem/util.cc b/components/filesystem/util.cc
index 059570ddb7153b03bae9c0232eca3c9b3dadefaa..d9257cc0b2de63742588fbde69cdcdffa56d564f 100644
--- a/components/filesystem/util.cc
+++ b/components/filesystem/util.cc
@@ -146,17 +146,16 @@ mojom::FileInformationPtr MakeFileInformation(const base::File::Info& info) {
return file_info;
}
-mojom::FileError ValidatePath(const mojo::String& raw_path,
+mojom::FileError ValidatePath(const std::string& raw_path,
const base::FilePath& filesystem_base,
base::FilePath* out) {
- DCHECK(!raw_path.is_null());
- if (!base::IsStringUTF8(raw_path.get()))
+ if (!base::IsStringUTF8(raw_path))
return mojom::FileError::INVALID_OPERATION;
#if defined(OS_POSIX)
base::FilePath::StringType path = raw_path;
#elif defined(OS_WIN)
- base::FilePath::StringType path = base::UTF8ToUTF16(raw_path.get());
+ base::FilePath::StringType path = base::UTF8ToUTF16(raw_path);
#endif
// TODO(erg): This isn't really what we want. FilePath::AppendRelativePath()
« no previous file with comments | « components/filesystem/util.h ('k') | components/leveldb/env_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698