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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 102843002: Move RemoveChars, ReplaceChars, TrimString, and TruncateUTF8ToByteSize to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 // chrome://settings. 1370 // chrome://settings.
1371 bool scheme_is_blocked = 1371 bool scheme_is_blocked =
1372 (!ChildProcessSecurityPolicyImpl::GetInstance()->IsWebSafeScheme( 1372 (!ChildProcessSecurityPolicyImpl::GetInstance()->IsWebSafeScheme(
1373 url.scheme()) && 1373 url.scheme()) &&
1374 !ChildProcessSecurityPolicyImpl::GetInstance()->IsPseudoScheme( 1374 !ChildProcessSecurityPolicyImpl::GetInstance()->IsPseudoScheme(
1375 url.scheme())) || 1375 url.scheme())) ||
1376 url.SchemeIs(kJavaScriptScheme); 1376 url.SchemeIs(kJavaScriptScheme);
1377 if (scheme_is_blocked || !url.is_valid()) { 1377 if (scheme_is_blocked || !url.is_valid()) {
1378 if (delegate_) { 1378 if (delegate_) {
1379 std::string error_type; 1379 std::string error_type;
1380 RemoveChars(net::ErrorToString(net::ERR_ABORTED), "net::", &error_type); 1380 base::RemoveChars(net::ErrorToString(net::ERR_ABORTED), "net::",
1381 &error_type);
1381 delegate_->LoadAbort(true /* is_top_level */, url, error_type); 1382 delegate_->LoadAbort(true /* is_top_level */, url, error_type);
1382 } 1383 }
1383 return; 1384 return;
1384 } 1385 }
1385 1386
1386 GURL validated_url(url); 1387 GURL validated_url(url);
1387 RenderViewHost::FilterURL( 1388 RenderViewHost::FilterURL(
1388 GetWebContents()->GetRenderProcessHost(), 1389 GetWebContents()->GetRenderProcessHost(),
1389 false, 1390 false,
1390 &validated_url); 1391 &validated_url);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 request_info.Set(browser_plugin::kRequestMethod, 1759 request_info.Set(browser_plugin::kRequestMethod,
1759 base::Value::CreateStringValue(request_method)); 1760 base::Value::CreateStringValue(request_method));
1760 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url)); 1761 request_info.Set(browser_plugin::kURL, base::Value::CreateStringValue(url));
1761 1762
1762 RequestPermission(BROWSER_PLUGIN_PERMISSION_TYPE_DOWNLOAD, 1763 RequestPermission(BROWSER_PLUGIN_PERMISSION_TYPE_DOWNLOAD,
1763 new DownloadRequest(callback), 1764 new DownloadRequest(callback),
1764 request_info); 1765 request_info);
1765 } 1766 }
1766 1767
1767 } // namespace content 1768 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698