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

Unified Diff: services/catalog/entry.cc

Issue 2651953002: Revert of [Service Manager] Get rid of dynamic service discovery (Closed)
Patch Set: Created 3 years, 11 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 | « services/catalog/entry.h ('k') | services/catalog/instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/entry.cc
diff --git a/services/catalog/entry.cc b/services/catalog/entry.cc
index 3af447019ceb178e4ab28598b6ff7decc1983882..83e9308dee227b39be4b69bae91250e9e72af9b5 100644
--- a/services/catalog/entry.cc
+++ b/services/catalog/entry.cc
@@ -4,20 +4,13 @@
#include "services/catalog/entry.h"
-#include "base/files/file_path.h"
#include "base/memory/ptr_util.h"
-#include "base/path_service.h"
#include "base/values.h"
#include "services/catalog/store.h"
+
namespace catalog {
namespace {
-
-#if defined(OS_WIN)
-const char kServiceExecutableExtension[] = ".service.exe";
-#else
-const char kServiceExecutableExtension[] = ".service";
-#endif
bool ReadStringSet(const base::ListValue& list_value,
std::set<std::string>* string_set) {
@@ -142,12 +135,7 @@
}
// static
-std::unique_ptr<Entry> Entry::Deserialize(const base::Value& manifest_root) {
- const base::DictionaryValue* dictionary_value = nullptr;
- if (!manifest_root.GetAsDictionary(&dictionary_value))
- return nullptr;
- const base::DictionaryValue& value = *dictionary_value;
-
+std::unique_ptr<Entry> Entry::Deserialize(const base::DictionaryValue& value) {
auto entry = base::MakeUnique<Entry>();
// Name.
@@ -162,13 +150,6 @@
return nullptr;
}
entry->set_name(name);
-
- // By default we assume a standalone service executable. The catalog may
- // override this layer based on configuration external to the service's own
- // manifest.
- base::FilePath module_path;
- base::PathService::Get(base::DIR_MODULE, &module_path);
- entry->set_path(module_path.AppendASCII(name + kServiceExecutableExtension));
// Human-readable name.
std::string display_name;
« no previous file with comments | « services/catalog/entry.h ('k') | services/catalog/instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698