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

Unified Diff: chrome/browser/extensions/api/proxy/proxy_api_helpers.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
Index: chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
index b89d3b87fa13031ac956a336b8169afe9fcc1c33..f22e8b3d5137de215149ecd4e1ff9ba0518b92d2 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -78,7 +78,7 @@ bool GetProxyModeFromExtensionPref(const base::DictionaryValue* proxy_config,
bool GetPacMandatoryFromExtensionPref(const base::DictionaryValue* proxy_config,
bool* out,
std::string* error,
- bool* bad_message){
+ bool* bad_message) {
const base::DictionaryValue* pac_dict = NULL;
proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict);
if (!pac_dict)
@@ -475,7 +475,7 @@ base::DictionaryValue* CreatePacScriptDict(
return NULL;
}
- if (pac_url.find("data") == 0) {
+ if (base::StartsWith(pac_url, "data", base::CompareCase::SENSITIVE)) {
std::string pac_data;
if (!CreatePACScriptFromDataURL(pac_url, &pac_data)) {
LOG(ERROR) << "Cannot decode base64-encoded PAC data URL: " << pac_url;
« no previous file with comments | « chrome/browser/devtools/device/devtools_android_bridge.cc ('k') | chrome/browser/memory/tab_manager_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698