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

Unified Diff: sky/tools/packager/loader.cc

Issue 1198313004: Make sky/tools/packager build on Mac (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/tools/packager/loader.h ('k') | sky/tools/packager/vm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/packager/loader.cc
diff --git a/sky/tools/packager/loader.cc b/sky/tools/packager/loader.cc
index d130bd231a49c5501eddbdaa9283bc612013c914..3d82739483dba917e4fffb5c3f006c72ef299ad6 100644
--- a/sky/tools/packager/loader.cc
+++ b/sky/tools/packager/loader.cc
@@ -4,8 +4,6 @@
#include "sky/tools/packager/loader.h"
-#include <utility>
-
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -44,7 +42,7 @@ base::FilePath SimplifyPath(const base::FilePath& path) {
class Loader {
public:
- Loader(base::FilePath package_root);
+ Loader(const base::FilePath& package_root);
std::string CanonicalizePackageURL(std::string url);
Dart_Handle CanonicalizeURL(Dart_Handle library, Dart_Handle url);
@@ -57,8 +55,8 @@ class Loader {
DISALLOW_COPY_AND_ASSIGN(Loader);
};
-Loader::Loader(base::FilePath package_root)
- : package_root_(std::move(package_root)) {
+Loader::Loader(const base::FilePath& package_root)
+ : package_root_(package_root) {
}
std::string Loader::CanonicalizePackageURL(std::string url) {
@@ -72,7 +70,7 @@ Dart_Handle Loader::CanonicalizeURL(Dart_Handle library, Dart_Handle url) {
if (StartsWithASCII(string, "dart:", true))
return url;
if (StartsWithASCII(string, "package:", true))
- return StringToDart(CanonicalizePackageURL(std::move(string)));
+ return StringToDart(CanonicalizePackageURL(string));
base::FilePath base_path(StringFromDart(Dart_LibraryUrl(library)));
base::FilePath resolved_path = base_path.DirName().Append(string);
base::FilePath normalized_path = SimplifyPath(resolved_path);
@@ -132,7 +130,7 @@ void LoadSkyInternals() {
LogIfError(Dart_LoadLibrary(library_name, StringToDart(Fetch(url)), 0, 0));
}
-void LoadScript(std::string url) {
+void LoadScript(const std::string& url) {
LogIfError(
Dart_LoadScript(StringToDart(url), StringToDart(Fetch(url)), 0, 0));
}
« no previous file with comments | « sky/tools/packager/loader.h ('k') | sky/tools/packager/vm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698