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

Side by Side Diff: components/history/core/browser/url_utils.h

Issue 1179953005: Add History.TopHostsVisitsByRank UMA metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@is_allowed
Patch Set: Use HistogramTester to eliminate test brittleness. Created 5 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
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 COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class GURL; 10 class GURL;
(...skipping 23 matching lines...) Expand all
34 // Treats |path1| and |path2| as lists of path components (e.g., ["a", "bb"] 34 // Treats |path1| and |path2| as lists of path components (e.g., ["a", "bb"]
35 // for "/a/bb"). Returns whether |path1|'s list is a prefix of |path2|'s list. 35 // for "/a/bb"). Returns whether |path1|'s list is a prefix of |path2|'s list.
36 // This is used to define "URL prefix". Note that "test" does not count as a 36 // This is used to define "URL prefix". Note that "test" does not count as a
37 // prefix of "testing", even though "test" is a (string) prefix of "testing". 37 // prefix of "testing", even though "test" is a (string) prefix of "testing".
38 bool IsPathPrefix(const std::string& p1, const std::string& p2); 38 bool IsPathPrefix(const std::string& p1, const std::string& p2);
39 39
40 // Converts |url| from HTTP to HTTPS, and vice versa, then returns the result. 40 // Converts |url| from HTTP to HTTPS, and vice versa, then returns the result.
41 // If |url| is neither HTTP nor HTTPS, returns an empty URL. 41 // If |url| is neither HTTP nor HTTPS, returns an empty URL.
42 GURL ToggleHTTPAndHTTPS(const GURL& url); 42 GURL ToggleHTTPAndHTTPS(const GURL& url);
43 43
44 // Returns the host of the given URL, canonicalized as it would be for
45 // HistoryService::TopHosts().
46 std::string HostForTopHosts(const GURL& url);
47
44 } // namespace history 48 } // namespace history
45 49
46 #endif // COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_ 50 #endif // COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/history_database.cc ('k') | components/history/core/browser/url_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698