Skip to content

Commit b6b480f

Browse files
committed
Remove FetcherConfig::RecordFlags
This was more useful at a time when `fetch_cvd` used gflags. Also, it has no callers.
1 parent 15c6802 commit b6b480f

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

base/cvd/cuttlefish/host/libs/config/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ cf_cc_library(
192192
"//cuttlefish/host/libs/config:file_source",
193193
"//libbase",
194194
"@abseil-cpp//absl/strings",
195-
"@gflags",
196195
"@jsoncpp",
197196
],
198197
)

base/cvd/cuttlefish/host/libs/config/fetcher_config.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <android-base/file.h>
3030
#include <android-base/logging.h>
3131
#include <android-base/strings.h>
32-
#include <gflags/gflags.h>
3332
#include <json/reader.h>
3433
#include <json/value.h>
3534
#include <json/writer.h>
@@ -44,7 +43,6 @@ namespace cuttlefish {
4443

4544
namespace {
4645

47-
const char* kFlags = "flags";
4846
const char* kCvdFiles = "cvd_files";
4947
const char* kCvdFileSource = "source";
5048
const char* kCvdFileBuildId = "build_id";
@@ -113,25 +111,6 @@ bool FetcherConfig::LoadFromFile(const std::string& file) {
113111
return true;
114112
}
115113

116-
void FetcherConfig::RecordFlags() {
117-
std::vector<gflags::CommandLineFlagInfo> all_flags;
118-
GetAllFlags(&all_flags);
119-
Json::Value flags_json(Json::arrayValue);
120-
for (const auto& flag : all_flags) {
121-
Json::Value flag_json;
122-
flag_json["name"] = flag.name;
123-
flag_json["type"] = flag.type;
124-
flag_json["description"] = flag.description;
125-
flag_json["current_value"] = flag.current_value;
126-
flag_json["default_value"] = flag.default_value;
127-
flag_json["filename"] = flag.filename;
128-
flag_json["has_validator_fn"] = flag.has_validator_fn;
129-
flag_json["is_default"] = flag.is_default;
130-
flags_json.append(flag_json);
131-
}
132-
(*dictionary_)[kFlags] = flags_json;
133-
}
134-
135114
namespace {
136115

137116
CvdFile JsonToCvdFile(const std::string& file_path, const Json::Value& json) {

base/cvd/cuttlefish/host/libs/config/fetcher_config.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ class FetcherConfig {
6969
bool SaveToFile(const std::string& file) const;
7070
bool LoadFromFile(const std::string& file);
7171

72-
// For debugging only, not intended for programmatic access.
73-
void RecordFlags();
74-
7572
bool add_cvd_file(const CvdFile& file, bool override_entry = false);
7673
std::map<std::string, CvdFile> get_cvd_files() const;
7774

0 commit comments

Comments
 (0)