Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/optional.h" | 9 #include "base/optional.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 base::Optional<base::TimeDelta> GetInitialForegroundDuration( | 127 base::Optional<base::TimeDelta> GetInitialForegroundDuration( |
| 128 const PageLoadExtraInfo& info, | 128 const PageLoadExtraInfo& info, |
| 129 base::TimeTicks app_background_time); | 129 base::TimeTicks app_background_time); |
| 130 | 130 |
| 131 // Whether the given loading behavior was observed in any frame (either the main | 131 // Whether the given loading behavior was observed in any frame (either the main |
| 132 // frame or a subframe). | 132 // frame or a subframe). |
| 133 bool DidObserveLoadingBehaviorInAnyFrame( | 133 bool DidObserveLoadingBehaviorInAnyFrame( |
| 134 const page_load_metrics::PageLoadExtraInfo& info, | 134 const page_load_metrics::PageLoadExtraInfo& info, |
| 135 blink::WebLoadingBehaviorFlag behavior); | 135 blink::WebLoadingBehaviorFlag behavior); |
| 136 | 136 |
| 137 // Whether the given url has a google serch hostname. | |
|
falken
2017/06/12 07:19:43
// Google Search
Consdier adding some examples:
/
horo
2017/06/12 15:10:37
Done.
| |
| 138 bool IsGoogleSearchHostname(const GURL& url); | |
| 139 | |
| 140 // Whether the given url has a google serch result url. | |
|
falken
2017/06/12 07:19:43
"whether the URL has a XXX URL" doesn't really mak
horo
2017/06/12 15:10:37
Done.
| |
| 141 bool IsGoogleSearchResultUrl(const GURL& url); | |
| 142 | |
| 143 // Whether the given url has a google serch's redirector url. | |
|
falken
2017/06/12 07:19:43
"is a Google Search redirector URL" ?
horo
2017/06/12 15:10:37
Done.
| |
| 144 bool IsGoogleSearchRedirectorUrl(const GURL& url); | |
| 145 | |
| 146 // Whether the given query string contains the given component. The query | |
| 147 // parameter should contain the query string of a URL (the portion following | |
| 148 // the question mark, excluding the question mark). The component must fully | |
| 149 // match a component in the query string. For example, 'foo=bar' would match | |
| 150 // the query string 'a=b&foo=bar&c=d' but would not match 'a=b&zzzfoo=bar&c=d' | |
| 151 // since, though foo=bar appears in the query string, the key specified in the | |
| 152 // component 'foo' does not match the full key in the query string | |
| 153 // 'zzzfoo'. For QueryContainsComponent, the component should of the form | |
| 154 // 'key=value'. For QueryContainsComponentPrefix, the component should be of | |
| 155 // the form 'key=' (where the value is not specified). | |
| 156 bool QueryContainsComponent(const base::StringPiece query, | |
| 157 const base::StringPiece component); | |
| 158 bool QueryContainsComponentPrefix(const base::StringPiece query, | |
| 159 const base::StringPiece component); | |
| 160 | |
| 137 } // namespace page_load_metrics | 161 } // namespace page_load_metrics |
| 138 | 162 |
| 139 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ | 163 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UTIL_H_ |
| OLD | NEW |