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

Unified Diff: google_apis/gcm/engine/gservices_settings.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 | « extensions/common/extension_l10n_util.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/gservices_settings.cc
diff --git a/google_apis/gcm/engine/gservices_settings.cc b/google_apis/gcm/engine/gservices_settings.cc
index cde4d7fbb2ba56aaea7a19ccf70dd56534b91b96..65f4453f2082ace3bac98a0d231fcf6698f7fa02 100644
--- a/google_apis/gcm/engine/gservices_settings.cc
+++ b/google_apis/gcm/engine/gservices_settings.cc
@@ -227,7 +227,8 @@ bool GServicesSettings::UpdateFromCheckinResponse(
return false;
}
- if (settings_diff && name.find(kDeleteSettingPrefix) == 0) {
+ if (settings_diff && base::StartsWith(name, kDeleteSettingPrefix,
+ base::CompareCase::SENSITIVE)) {
std::string setting_to_delete =
name.substr(arraysize(kDeleteSettingPrefix) - 1);
new_settings.erase(setting_to_delete);
« no previous file with comments | « extensions/common/extension_l10n_util.cc ('k') | media/base/key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698