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

Unified Diff: chrome/browser/guest_view/ad_view/ad_view_guest.cc

Issue 296593003: Make various string_util functions take StringPieces instead of char[]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resync Created 6 years, 7 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 | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/guest_view/ad_view/ad_view_guest.cc
diff --git a/chrome/browser/guest_view/ad_view/ad_view_guest.cc b/chrome/browser/guest_view/ad_view/ad_view_guest.cc
index dd6b586cd42c45ba8f4dcb6ce384baedd15bf699..2e5106b6ee251d6dcec292cbdba363ef3ac6dd01 100644
--- a/chrome/browser/guest_view/ad_view/ad_view_guest.cc
+++ b/chrome/browser/guest_view/ad_view/ad_view_guest.cc
@@ -50,8 +50,9 @@ void AdViewGuest::DidFailProvisionalLoad(
const base::string16& error_description,
content::RenderViewHost* render_view_host) {
// Translate the |error_code| into an error string.
- std::string error_type;
- base::RemoveChars(net::ErrorToString(error_code), "net::", &error_type);
+ std::string error_type(net::ErrorToString(error_code));
+ DCHECK(StartsWithASCII(error_type, "net::", true));
+ error_type.erase(0, 5);
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetBoolean(guestview::kIsTopLevel, is_main_frame);
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698