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

Unified Diff: media/base/key_systems.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 4 years, 5 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 | « google_apis/gcm/engine/gservices_settings.cc ('k') | media/cast/sender/external_video_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/key_systems.cc
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index e970f0a474a79ca3512b54432d44a8057baa3453..4567bf4c614a12bb8d46c1f758f44e302c5434ca 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -169,10 +169,8 @@ static bool IsPotentiallySupportedKeySystem(const std::string& key_system) {
// can use the "x-" prefix to avoid conflicting with and advertising support
// for real key system names. Use is discouraged.
const char kExcludedPrefix[] = "x-";
- if (key_system.find(kExcludedPrefix, 0, arraysize(kExcludedPrefix) - 1) == 0)
- return true;
-
- return false;
+ return base::StartsWith(key_system, kExcludedPrefix,
+ base::CompareCase::SENSITIVE);
}
class KeySystemsImpl : public KeySystems {
« no previous file with comments | « google_apis/gcm/engine/gservices_settings.cc ('k') | media/cast/sender/external_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698