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

Side by Side Diff: url/gurl.h

Issue 2029213002: Fix generation of inner_url in GURL::ReplacementComponents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 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
« no previous file with comments | « no previous file | url/gurl.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 #ifndef URL_GURL_H_ 5 #ifndef URL_GURL_H_
6 #define URL_GURL_H_ 6 #define URL_GURL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 void Swap(GURL* other); 387 void Swap(GURL* other);
388 388
389 // Returns a reference to a singleton empty GURL. This object is for callers 389 // Returns a reference to a singleton empty GURL. This object is for callers
390 // who return references but don't have anything to return in some cases. 390 // who return references but don't have anything to return in some cases.
391 // If you just want an empty URL for normal use, prefer GURL(). This function 391 // If you just want an empty URL for normal use, prefer GURL(). This function
392 // may be called from any thread. 392 // may be called from any thread.
393 static const GURL& EmptyGURL(); 393 static const GURL& EmptyGURL();
394 394
395 // Returns the inner URL of a nested URL (currently only non-null for 395 // Returns the inner URL of a nested URL (currently only non-null for
396 // filesystem URLs). 396 // filesystem URLs).
397 //
398 // TODO(mmenke): inner_url().spec() currently returns the same value as
399 // caling spec() on the GURL itself. This should be fixed.
400 // See https://crbug.com/619596
397 const GURL* inner_url() const { 401 const GURL* inner_url() const {
398 return inner_url_.get(); 402 return inner_url_.get();
399 } 403 }
400 404
401 private: 405 private:
402 // Variant of the string parsing constructor that allows the caller to elect 406 // Variant of the string parsing constructor that allows the caller to elect
403 // retain trailing whitespace, if any, on the passed URL spec, but only if 407 // retain trailing whitespace, if any, on the passed URL spec, but only if
404 // the scheme is one that allows trailing whitespace. The primary use-case is 408 // the scheme is one that allows trailing whitespace. The primary use-case is
405 // for data: URLs. In most cases, you want to use the single parameter 409 // for data: URLs. In most cases, you want to use the single parameter
406 // constructor above. 410 // constructor above.
(...skipping 30 matching lines...) Expand all
437 url::Parsed parsed_; 441 url::Parsed parsed_;
438 442
439 // Used for nested schemes [currently only filesystem:]. 443 // Used for nested schemes [currently only filesystem:].
440 std::unique_ptr<GURL> inner_url_; 444 std::unique_ptr<GURL> inner_url_;
441 }; 445 };
442 446
443 // Stream operator so GURL can be used in assertion statements. 447 // Stream operator so GURL can be used in assertion statements.
444 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); 448 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url);
445 449
446 #endif // URL_GURL_H_ 450 #endif // URL_GURL_H_
OLDNEW
« no previous file with comments | « no previous file | url/gurl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698