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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build 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: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 4daa4c722578306b04d2c0a0fce759a968f6123f..7d747e9a141a81a0643bc8c9ac0fc8fbb7fd088e 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -1469,7 +1469,8 @@ void DownloadFile(PP_Instance instance,
// Handle special PNaCl support files which are installed on the user's
// machine.
- if (url.find(kPNaClTranslatorBaseUrl, 0) == 0) {
+ if (base::StartsWith(url, kPNaClTranslatorBaseUrl,
+ base::CompareCase::SENSITIVE)) {
PP_NaClFileInfo file_info = kInvalidNaClFileInfo;
PP_FileHandle handle = GetReadonlyPnaclFd(url.c_str(),
false /* is_executable */,

Powered by Google App Engine
This is Rietveld 408576698