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

Unified Diff: mojo/shell/public/cpp/lib/names.cc

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 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
« no previous file with comments | « mojo/shell/public/cpp/lib/message_loop_ref.cc ('k') | mojo/shell/public/cpp/lib/shell_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/names.cc
diff --git a/mojo/shell/public/cpp/lib/names.cc b/mojo/shell/public/cpp/lib/names.cc
deleted file mode 100644
index 971e8aae835184c5250b0a7a9c2e8e49d77f278c..0000000000000000000000000000000000000000
--- a/mojo/shell/public/cpp/lib/names.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/shell/public/cpp/names.h"
-
-#include "base/strings/string_split.h"
-#include "base/strings/string_util.h"
-
-namespace mojo {
-
-const char kNameType_Mojo[] = "mojo";
-const char kNameType_Exe[] = "exe";
-
-bool IsValidName(const std::string& name) {
- std::vector<std::string> parts =
- base::SplitString(name, ":", base::KEEP_WHITESPACE,
- base::SPLIT_WANT_ALL);
- if (parts.size() != 2)
- return false;
-
- if (parts.front().empty())
- return false;
-
- const std::string& path = parts.back();
- return !path.empty() &&
- !base::StartsWith(path, "//", base::CompareCase::INSENSITIVE_ASCII);
-}
-
-std::string GetNameType(const std::string& name) {
- std::vector<std::string> parts =
- base::SplitString(name, ":", base::KEEP_WHITESPACE,
- base::SPLIT_WANT_ALL);
- DCHECK(2 == parts.size());
- return parts.front();
-}
-
-std::string GetNamePath(const std::string& name) {
- std::vector<std::string> parts =
- base::SplitString(name, ":", base::KEEP_WHITESPACE,
- base::SPLIT_WANT_ALL);
- DCHECK(2 == parts.size());
- return parts.back();
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/shell/public/cpp/lib/message_loop_ref.cc ('k') | mojo/shell/public/cpp/lib/shell_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698