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

Side by Side Diff: net/base/net_util.cc

Issue 15950011: content: Move kViewSourceScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « content/test/net/url_request_mock_http_job.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/base/net_util.h" 5 #include "net/base/net_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 10
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 std::vector<size_t>* offsets_for_adjustment) { 1538 std::vector<size_t>* offsets_for_adjustment) {
1539 url_parse::Parsed parsed_temp; 1539 url_parse::Parsed parsed_temp;
1540 if (!new_parsed) 1540 if (!new_parsed)
1541 new_parsed = &parsed_temp; 1541 new_parsed = &parsed_temp;
1542 else 1542 else
1543 *new_parsed = url_parse::Parsed(); 1543 *new_parsed = url_parse::Parsed();
1544 std::vector<size_t> original_offsets; 1544 std::vector<size_t> original_offsets;
1545 if (offsets_for_adjustment) 1545 if (offsets_for_adjustment)
1546 original_offsets = *offsets_for_adjustment; 1546 original_offsets = *offsets_for_adjustment;
1547 1547
1548 // Special handling for view-source:. Don't use chrome::kViewSourceScheme 1548 // Special handling for view-source:. Don't use content::kViewSourceScheme
1549 // because this library shouldn't depend on chrome. 1549 // because this library shouldn't depend on chrome.
1550 const char* const kViewSource = "view-source"; 1550 const char* const kViewSource = "view-source";
1551 // Reject "view-source:view-source:..." to avoid deep recursion. 1551 // Reject "view-source:view-source:..." to avoid deep recursion.
1552 const char* const kViewSourceTwice = "view-source:view-source:"; 1552 const char* const kViewSourceTwice = "view-source:view-source:";
1553 if (url.SchemeIs(kViewSource) && 1553 if (url.SchemeIs(kViewSource) &&
1554 !StartsWithASCII(url.possibly_invalid_spec(), kViewSourceTwice, false)) { 1554 !StartsWithASCII(url.possibly_invalid_spec(), kViewSourceTwice, false)) {
1555 return FormatViewSourceUrl(url, original_offsets, languages, format_types, 1555 return FormatViewSourceUrl(url, original_offsets, languages, format_types,
1556 unescape_rules, new_parsed, prefix_end, offsets_for_adjustment); 1556 unescape_rules, new_parsed, prefix_end, offsets_for_adjustment);
1557 } 1557 }
1558 1558
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 2224
2225 NetworkInterface::NetworkInterface(const std::string& name, 2225 NetworkInterface::NetworkInterface(const std::string& name,
2226 const IPAddressNumber& address) 2226 const IPAddressNumber& address)
2227 : name(name), address(address) { 2227 : name(name), address(address) {
2228 } 2228 }
2229 2229
2230 NetworkInterface::~NetworkInterface() { 2230 NetworkInterface::~NetworkInterface() {
2231 } 2231 }
2232 2232
2233 } // namespace net 2233 } // namespace net
OLDNEW
« no previous file with comments | « content/test/net/url_request_mock_http_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698