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

Side by Side Diff: url/gurl.h

Issue 496683002: Updating buffered duration of local resource in android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years, 3 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 | « media/base/android/media_player_bridge.cc ('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 #ifndef URL_GURL_H_ 5 #ifndef URL_GURL_H_
6 #define URL_GURL_H_ 6 #define URL_GURL_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 bool SchemeIsFileSystem() const { 229 bool SchemeIsFileSystem() const {
230 return SchemeIs(url::kFileSystemScheme); 230 return SchemeIs(url::kFileSystemScheme);
231 } 231 }
232 232
233 // If the scheme indicates a secure connection 233 // If the scheme indicates a secure connection
234 bool SchemeIsSecure() const { 234 bool SchemeIsSecure() const {
235 return SchemeIs(url::kHttpsScheme) || SchemeIs(url::kWssScheme) || 235 return SchemeIs(url::kHttpsScheme) || SchemeIs(url::kWssScheme) ||
236 (SchemeIsFileSystem() && inner_url() && inner_url()->SchemeIsSecure()); 236 (SchemeIsFileSystem() && inner_url() && inner_url()->SchemeIsSecure());
237 } 237 }
238 238
239 // Returns true if the scheme is "blob".
240 bool SchemeIsBlob() const {
241 return SchemeIs(url::kBlobScheme);
242 }
243
239 // The "content" of the URL is everything after the scheme (skipping the 244 // The "content" of the URL is everything after the scheme (skipping the
240 // scheme delimiting colon). It is an error to get the origin of an invalid 245 // scheme delimiting colon). It is an error to get the origin of an invalid
241 // URL. The result will be an empty string. 246 // URL. The result will be an empty string.
242 std::string GetContent() const; 247 std::string GetContent() const;
243 248
244 // Returns true if the hostname is an IP address. Note: this function isn't 249 // Returns true if the hostname is an IP address. Note: this function isn't
245 // as cheap as a simple getter because it re-parses the hostname to verify. 250 // as cheap as a simple getter because it re-parses the hostname to verify.
246 // This currently identifies only IPv4 addresses (bug 822685). 251 // This currently identifies only IPv4 addresses (bug 822685).
247 bool HostIsIPAddress() const; 252 bool HostIsIPAddress() const;
248 253
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Used for nested schemes [currently only filesystem:]. 403 // Used for nested schemes [currently only filesystem:].
399 scoped_ptr<GURL> inner_url_; 404 scoped_ptr<GURL> inner_url_;
400 405
401 // TODO bug 684583: Add encoding for query params. 406 // TODO bug 684583: Add encoding for query params.
402 }; 407 };
403 408
404 // Stream operator so GURL can be used in assertion statements. 409 // Stream operator so GURL can be used in assertion statements.
405 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); 410 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url);
406 411
407 #endif // URL_GURL_H_ 412 #endif // URL_GURL_H_
OLDNEW
« no previous file with comments | « media/base/android/media_player_bridge.cc ('k') | url/gurl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698