mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Cleanup FieldTrialView
Delete alias WebRtcKeyValueConfig as unused Replace .find() == 0 with absl::StartsWith per clang-tidy recommendation https://clang.llvm.org/extra/clang-tidy/checks/abseil/string-find-startswith.html Bug: webrtc:10335 Change-Id: I1f09c262844c0678a8d8c0d0d3274df3d947737c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299181 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39690}
This commit is contained in:
parent
a3f7b54518
commit
e14abcb20b
1 changed files with 3 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
|
||||
|
@ -32,18 +33,14 @@ class RTC_EXPORT FieldTrialsView {
|
|||
virtual std::string Lookup(absl::string_view key) const = 0;
|
||||
|
||||
bool IsEnabled(absl::string_view key) const {
|
||||
return Lookup(key).find("Enabled") == 0;
|
||||
return absl::StartsWith(Lookup(key), "Enabled");
|
||||
}
|
||||
|
||||
bool IsDisabled(absl::string_view key) const {
|
||||
return Lookup(key).find("Disabled") == 0;
|
||||
return absl::StartsWith(Lookup(key), "Disabled");
|
||||
}
|
||||
};
|
||||
|
||||
// TODO(bugs.webrtc.org/10335): Remove once all migrated to
|
||||
// api/field_trials_view.h
|
||||
typedef FieldTrialsView WebRtcKeyValueConfig;
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_FIELD_TRIALS_VIEW_H_
|
||||
|
|
Loading…
Reference in a new issue