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

Side by Side Diff: url/gurl.cc

Issue 1542703002: Switch to standard integer types in url/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « url/gurl.h ('k') | url/gurl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "url/gurl.h"
6
7 #include <stddef.h>
8
9 #include <algorithm>
10 #include <ostream>
11
12 #include "base/logging.h"
13 #include "base/strings/string_piece.h"
14 #include "base/strings/string_util.h"
15 #include "url/url_canon_stdstring.h"
16 #include "url/url_util.h"
17
5 #ifdef WIN32 18 #ifdef WIN32
6 #include <windows.h> 19 #include <windows.h>
7 #else 20 #else
8 #include <pthread.h> 21 #include <pthread.h>
9 #endif 22 #endif
10 23
11 #include <algorithm>
12 #include <ostream>
13
14 #include "url/gurl.h"
15
16 #include "base/logging.h"
17 #include "base/strings/string_piece.h"
18 #include "base/strings/string_util.h"
19 #include "url/url_canon_stdstring.h"
20 #include "url/url_util.h"
21
22 namespace { 24 namespace {
23 25
24 static std::string* empty_string = NULL; 26 static std::string* empty_string = NULL;
25 static GURL* empty_gurl = NULL; 27 static GURL* empty_gurl = NULL;
26 28
27 #ifdef WIN32 29 #ifdef WIN32
28 30
29 // Returns a static reference to an empty string for returning a reference 31 // Returns a static reference to an empty string for returning a reference
30 // when there is no underlying string. 32 // when there is no underlying string.
31 const std::string& EmptyStringForGURL() { 33 const std::string& EmptyStringForGURL() {
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 void GURL::Swap(GURL* other) { 532 void GURL::Swap(GURL* other) {
531 spec_.swap(other->spec_); 533 spec_.swap(other->spec_);
532 std::swap(is_valid_, other->is_valid_); 534 std::swap(is_valid_, other->is_valid_);
533 std::swap(parsed_, other->parsed_); 535 std::swap(parsed_, other->parsed_);
534 inner_url_.swap(other->inner_url_); 536 inner_url_.swap(other->inner_url_);
535 } 537 }
536 538
537 std::ostream& operator<<(std::ostream& out, const GURL& url) { 539 std::ostream& operator<<(std::ostream& out, const GURL& url) {
538 return out << url.possibly_invalid_spec(); 540 return out << url.possibly_invalid_spec();
539 } 541 }
OLDNEW
« no previous file with comments | « url/gurl.h ('k') | url/gurl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698