Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc |
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc |
index 976c414307afaa0f9a2dd0904d5c5162a82a8826..05dfb393477586d05a3e992cb3dc4c2b19fecddb 100644 |
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc |
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc |
@@ -12,6 +12,7 @@ |
#include "base/i18n/rtl.h" |
#include "base/lazy_instance.h" |
#include "base/string_number_conversions.h" |
+#include "base/string_piece.h" |
#include "base/stringprintf.h" |
#include "base/utf_string_conversions.h" |
#include "base/values.h" |
@@ -467,8 +468,9 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { |
size_t colon_index = command.find(':'); |
if (colon_index != std::string::npos) { |
DCHECK(colon_index < command.size() - 1); |
- bool result = base::StringToInt(command.begin() + colon_index + 1, |
- command.end(), |
+ bool result = base::StringToInt(base::StringPiece(command.begin() + |
+ colon_index + 1, |
+ command.end()), |
&element_index); |
command = command.substr(0, colon_index); |
DCHECK(result); |