Commit 680276ec authored by Ryan Sturm's avatar Ryan Sturm Committed by Commit Bot

Removing using base::StringPiece from Data_reduction_proxy

It's an anti-pattern to have "using" for a namespace that contains
methods that the code depends on.

Bug: 678368
Change-Id: Icbfbceb35c2384fd6ae20c187d579f1df7913a90
Reviewed-on: https://chromium-review.googlesource.com/803619Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521470}
parent d488264c
......@@ -23,8 +23,6 @@
#include "net/http/http_util.h"
#include "net/url_request/url_request.h"
using base::StringPiece;
namespace {
const char kChromeProxyHeader[] = "chrome-proxy";
......@@ -290,7 +288,8 @@ bool ParseHeadersAndSetBypassDuration(const net::HttpResponseHeaders& headers,
if (StartsWithActionPrefix(value, action_prefix)) {
int64_t seconds;
if (!base::StringToInt64(
StringPiece(value).substr(action_prefix.size() + 1), &seconds) ||
base::StringPiece(value).substr(action_prefix.size() + 1),
&seconds) ||
seconds < 0) {
continue; // In case there is a well formed instruction.
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment