| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // for public sessions only. | 27 // for public sessions only. |
| 28 class TermsOfServiceScreen : public WizardScreen, | 28 class TermsOfServiceScreen : public WizardScreen, |
| 29 public TermsOfServiceScreenActor::Delegate, | 29 public TermsOfServiceScreenActor::Delegate, |
| 30 public net::URLFetcherDelegate { | 30 public net::URLFetcherDelegate { |
| 31 public: | 31 public: |
| 32 TermsOfServiceScreen(ScreenObserver* screen_observer, | 32 TermsOfServiceScreen(ScreenObserver* screen_observer, |
| 33 TermsOfServiceScreenActor* actor); | 33 TermsOfServiceScreenActor* actor); |
| 34 virtual ~TermsOfServiceScreen(); | 34 virtual ~TermsOfServiceScreen(); |
| 35 | 35 |
| 36 // WizardScreen: | 36 // WizardScreen: |
| 37 virtual void PrepareToShow() OVERRIDE; | 37 virtual void PrepareToShow() override; |
| 38 virtual void Show() OVERRIDE; | 38 virtual void Show() override; |
| 39 virtual void Hide() OVERRIDE; | 39 virtual void Hide() override; |
| 40 virtual std::string GetName() const OVERRIDE; | 40 virtual std::string GetName() const override; |
| 41 | 41 |
| 42 // TermsOfServiceScreenActor::Delegate: | 42 // TermsOfServiceScreenActor::Delegate: |
| 43 virtual void OnDecline() OVERRIDE; | 43 virtual void OnDecline() override; |
| 44 virtual void OnAccept() OVERRIDE; | 44 virtual void OnAccept() override; |
| 45 virtual void OnActorDestroyed(TermsOfServiceScreenActor* actor) OVERRIDE; | 45 virtual void OnActorDestroyed(TermsOfServiceScreenActor* actor) override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Start downloading the Terms of Service. | 48 // Start downloading the Terms of Service. |
| 49 void StartDownload(); | 49 void StartDownload(); |
| 50 | 50 |
| 51 // Abort the attempt to download the Terms of Service if it takes too long. | 51 // Abort the attempt to download the Terms of Service if it takes too long. |
| 52 void OnDownloadTimeout(); | 52 void OnDownloadTimeout(); |
| 53 | 53 |
| 54 // net::URLFetcherDelegate: | 54 // net::URLFetcherDelegate: |
| 55 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 55 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 56 | 56 |
| 57 TermsOfServiceScreenActor* actor_; | 57 TermsOfServiceScreenActor* actor_; |
| 58 | 58 |
| 59 scoped_ptr<net::URLFetcher> terms_of_service_fetcher_; | 59 scoped_ptr<net::URLFetcher> terms_of_service_fetcher_; |
| 60 | 60 |
| 61 // Timer that enforces a custom (shorter) timeout on the attempt to download | 61 // Timer that enforces a custom (shorter) timeout on the attempt to download |
| 62 // the Terms of Service. | 62 // the Terms of Service. |
| 63 base::OneShotTimer<TermsOfServiceScreen> download_timer_; | 63 base::OneShotTimer<TermsOfServiceScreen> download_timer_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreen); | 65 DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreen); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace chromeos | 68 } // namespace chromeos |
| 69 | 69 |
| 70 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_H_ | 70 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_TERMS_OF_SERVICE_SCREEN_H_ |
| OLD | NEW |