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

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: 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: 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 db128c400b8ec7c950096cd72bb3605bbecc96de..0d6eacf24793d2bf39ab67c6af163d4b654b16f4 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -1468,7 +1468,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