Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_GOOGLE_CAPTCHA_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_GOOGLE_CAPTCHA_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/page_load_metrics/browser/page_load_metrics_observer.h" | |
| 10 | |
| 11 namespace google_captcha_observer { | |
| 12 | |
| 13 // Returns true if the given URL matches a Google CAPTCHA page. | |
| 14 bool IsGoogleCaptcha(const GURL& url); | |
|
Bryan McQuade
2015/11/16 18:58:55
re: removing the namespace, could we make this a s
Charlie Harrison
2015/11/16 19:12:38
There was a discussion about this in the original
| |
| 15 | |
| 16 class GoogleCaptchaObserver | |
| 17 : public page_load_metrics::PageLoadMetricsObserver { | |
| 18 public: | |
| 19 explicit GoogleCaptchaObserver( | |
| 20 page_load_metrics::PageLoadMetricsObservable* metrics); | |
| 21 | |
| 22 // page_load_metrics::PageLoadMetricsObserver implementation: | |
| 23 void OnCommit(content::NavigationHandle* navigation_handle) override; | |
| 24 void OnRedirect(content::NavigationHandle* navigation_handle) override; | |
| 25 void OnPageLoadMetricsGoingAway() override; | |
| 26 | |
| 27 private: | |
| 28 page_load_metrics::PageLoadMetricsObservable* const metrics_; | |
| 29 DISALLOW_COPY_AND_ASSIGN(GoogleCaptchaObserver); | |
| 30 | |
| 31 }; | |
| 32 | |
| 33 } // namespace google_captcha_observer | |
|
Charlie Harrison
2015/11/16 19:12:38
nit: space after }. I just tested git cl format an
| |
| 34 | |
| 35 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_GOOGLE_CAPTCHA_OBSERVER_H_ | |
| OLD | NEW |