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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.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, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 default: 366 default:
367 NOTREACHED(); 367 NOTREACHED();
368 break; 368 break;
369 } 369 }
370 } 370 }
371 } 371 }
372 372
373 // Helper function to escape "&" as "&&". 373 // Helper function to escape "&" as "&&".
374 void EscapeAmpersands(base::string16* text) { 374 void EscapeAmpersands(base::string16* text) {
375 const base::char16 ampersand[] = {'&', 0}; 375 base::ReplaceChars(*text, base::ASCIIToUTF16("&"), base::ASCIIToUTF16("&&"),
376 base::ReplaceChars(*text, ampersand, base::ASCIIToUTF16("&&"), text); 376 text);
377 } 377 }
378 378
379 } // namespace 379 } // namespace
380 380
381 // static 381 // static
382 const size_t RenderViewContextMenu::kMaxSelectionTextLength = 50; 382 const size_t RenderViewContextMenu::kMaxSelectionTextLength = 50;
383 383
384 // static 384 // static
385 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) { 385 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) {
386 return url.SchemeIs(content::kChromeDevToolsScheme); 386 return url.SchemeIs(content::kChromeDevToolsScheme);
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 source_web_contents_->GetRenderViewHost()-> 1987 source_web_contents_->GetRenderViewHost()->
1988 ExecuteMediaPlayerActionAtLocation(location, action); 1988 ExecuteMediaPlayerActionAtLocation(location, action);
1989 } 1989 }
1990 1990
1991 void RenderViewContextMenu::PluginActionAt( 1991 void RenderViewContextMenu::PluginActionAt(
1992 const gfx::Point& location, 1992 const gfx::Point& location,
1993 const WebPluginAction& action) { 1993 const WebPluginAction& action) {
1994 source_web_contents_->GetRenderViewHost()-> 1994 source_web_contents_->GetRenderViewHost()->
1995 ExecutePluginActionAtLocation(location, action); 1995 ExecutePluginActionAtLocation(location, action);
1996 } 1996 }
OLDNEW
« no previous file with comments | « chrome/browser/profile_resetter/resettable_settings_snapshot.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698