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

Unified Diff: mojo/shell/dynamic_application_loader.cc

Issue 640403002: Drop refs to net::EmbeddedTestServer / net::File{Path,URL} utils in mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « mojo/shell/BUILD.gn ('k') | mojo/shell/dynamic_application_loader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/dynamic_application_loader.cc
diff --git a/mojo/shell/dynamic_application_loader.cc b/mojo/shell/dynamic_application_loader.cc
index 1f24cf37fb16024b3c232baecc746838f2f21271..4c0cf7ef0953a8aadb4f72ce06641c1c1389d61b 100644
--- a/mojo/shell/dynamic_application_loader.cc
+++ b/mojo/shell/dynamic_application_loader.cc
@@ -11,12 +11,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
+#include "base/strings/utf_string_conversions.h"
#include "mojo/common/common_type_converters.h"
#include "mojo/common/data_pipe_utils.h"
#include "mojo/services/public/interfaces/network/url_loader.mojom.h"
#include "mojo/shell/context.h"
+#include "mojo/shell/filename_util.h"
#include "mojo/shell/switches.h"
-#include "net/base/filename_util.h"
namespace mojo {
namespace shell {
@@ -92,8 +93,12 @@ class DynamicApplicationLoader::LocalLoader : public Loader {
load_callbacks,
loader_complete_callback),
weak_ptr_factory_(this) {
- base::FilePath path;
- net::FileURLToFilePath(url, &path);
+ DCHECK(url.SchemeIsFile());
+#if defined(OS_WIN)
+ base::FilePath path(base::ASCIIToUTF16(url.path()));
brettw 2014/10/09 22:26:29 This isn't correct, the path on Windows will be "/
+#else
+ base::FilePath path(url.path());
+#endif
// Async for consistency with network case.
base::MessageLoop::current()->PostTask(
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | mojo/shell/dynamic_application_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698