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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.h

Issue 856493004: Update {virtual,override,final} to follow C++11 style in chrome/browser/chromeos/login. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM PL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM PL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM PL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_IM PL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 namespace chromeos { 28 namespace chromeos {
29 29
30 class EnterpriseEnrollmentHelperImpl : public EnterpriseEnrollmentHelper, 30 class EnterpriseEnrollmentHelperImpl : public EnterpriseEnrollmentHelper,
31 public BrowsingDataRemover::Observer { 31 public BrowsingDataRemover::Observer {
32 public: 32 public:
33 EnterpriseEnrollmentHelperImpl( 33 EnterpriseEnrollmentHelperImpl(
34 EnrollmentStatusConsumer* status_consumer, 34 EnrollmentStatusConsumer* status_consumer,
35 const policy::EnrollmentConfig& enrollment_config, 35 const policy::EnrollmentConfig& enrollment_config,
36 const std::string& enrolling_user_domain); 36 const std::string& enrolling_user_domain);
37 virtual ~EnterpriseEnrollmentHelperImpl(); 37 ~EnterpriseEnrollmentHelperImpl() override;
38 38
39 // Overridden from EnterpriseEnrollmentHelper: 39 // Overridden from EnterpriseEnrollmentHelper:
40 virtual void EnrollUsingProfile(Profile* profile, 40 void EnrollUsingProfile(Profile* profile,
41 bool fetch_additional_token) override; 41 bool fetch_additional_token) override;
42 virtual void EnrollUsingToken(const std::string& token) override; 42 void EnrollUsingToken(const std::string& token) override;
43 virtual void ClearAuth(const base::Closure& callback) override; 43 void ClearAuth(const base::Closure& callback) override;
44 44
45 private: 45 private:
46 void DoEnrollUsingToken(const std::string& token); 46 void DoEnrollUsingToken(const std::string& token);
47 47
48 // Handles completion of the OAuth2 token fetch attempt. 48 // Handles completion of the OAuth2 token fetch attempt.
49 void OnTokenFetched(size_t fetcher_index, 49 void OnTokenFetched(size_t fetcher_index,
50 const std::string& token, 50 const std::string& token,
51 const GoogleServiceAuthError& error); 51 const GoogleServiceAuthError& error);
52 52
53 // Handles completion of the enrollment attempt. 53 // Handles completion of the enrollment attempt.
54 void OnEnrollmentFinished(policy::EnrollmentStatus status); 54 void OnEnrollmentFinished(policy::EnrollmentStatus status);
55 55
56 void ReportAuthStatus(const GoogleServiceAuthError& error); 56 void ReportAuthStatus(const GoogleServiceAuthError& error);
57 void ReportEnrollmentStatus(policy::EnrollmentStatus status); 57 void ReportEnrollmentStatus(policy::EnrollmentStatus status);
58 58
59 // Logs an UMA event in the kMetricEnrollment or the kMetricEnrollmentRecovery 59 // Logs an UMA event in the kMetricEnrollment or the kMetricEnrollmentRecovery
60 // histogram, depending on |enrollment_mode_|. 60 // histogram, depending on |enrollment_mode_|.
61 void UMA(policy::MetricEnrollment sample); 61 void UMA(policy::MetricEnrollment sample);
62 62
63 // Overridden from BrowsingDataRemover::Observer: 63 // Overridden from BrowsingDataRemover::Observer:
64 virtual void OnBrowsingDataRemoverDone() override; 64 void OnBrowsingDataRemoverDone() override;
65 65
66 const policy::EnrollmentConfig enrollment_config_; 66 const policy::EnrollmentConfig enrollment_config_;
67 const std::string enrolling_user_domain_; 67 const std::string enrolling_user_domain_;
68 Profile* profile_; 68 Profile* profile_;
69 bool fetch_additional_token_; 69 bool fetch_additional_token_;
70 70
71 bool started_; 71 bool started_;
72 size_t oauth_fetchers_finished_; 72 size_t oauth_fetchers_finished_;
73 GoogleServiceAuthError last_auth_error_; 73 GoogleServiceAuthError last_auth_error_;
74 std::string additional_token_; 74 std::string additional_token_;
(...skipping 10 matching lines...) Expand all
85 ScopedVector<policy::PolicyOAuth2TokenFetcher> oauth_fetchers_; 85 ScopedVector<policy::PolicyOAuth2TokenFetcher> oauth_fetchers_;
86 86
87 base::WeakPtrFactory<EnterpriseEnrollmentHelperImpl> weak_ptr_factory_; 87 base::WeakPtrFactory<EnterpriseEnrollmentHelperImpl> weak_ptr_factory_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelperImpl); 89 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelperImpl);
90 }; 90 };
91 91
92 } // namespace chromeos 92 } // namespace chromeos
93 93
94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _IMPL_H_ 94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698