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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" 13 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
14 14
15 class GoogleServiceAuthError; 15 class GoogleServiceAuthError;
16 class Profile; 16 class Profile;
17 17
18 namespace policy { 18 namespace policy {
19 struct EnrollmentConfig; 19 struct EnrollmentConfig;
20 class EnrollmentStatus; 20 class EnrollmentStatus;
21 } 21 }
22 22
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Called when device attribute update permission granted, 60 // Called when device attribute update permission granted,
61 // |granted| indicates whether permission granted or not. 61 // |granted| indicates whether permission granted or not.
62 virtual void OnDeviceAttributeUpdatePermission(bool granted) = 0; 62 virtual void OnDeviceAttributeUpdatePermission(bool granted) = 0;
63 63
64 // Called when device attribute upload finishes. |success| indicates 64 // Called when device attribute upload finishes. |success| indicates
65 // whether it is successful or not. 65 // whether it is successful or not.
66 virtual void OnDeviceAttributeUploadCompleted(bool success) = 0; 66 virtual void OnDeviceAttributeUploadCompleted(bool success) = 0;
67 }; 67 };
68 68
69 // Factory method. Caller takes ownership of the returned object. 69 // Factory method. Caller takes ownership of the returned object.
70 static scoped_ptr<EnterpriseEnrollmentHelper> Create( 70 static std::unique_ptr<EnterpriseEnrollmentHelper> Create(
71 EnrollmentStatusConsumer* status_consumer, 71 EnrollmentStatusConsumer* status_consumer,
72 const policy::EnrollmentConfig& enrollment_config, 72 const policy::EnrollmentConfig& enrollment_config,
73 const std::string& enrolling_user_domain); 73 const std::string& enrolling_user_domain);
74 74
75 using CreateMockEnrollmentHelper = EnterpriseEnrollmentHelper* (*)( 75 using CreateMockEnrollmentHelper = EnterpriseEnrollmentHelper* (*)(
76 EnrollmentStatusConsumer* status_consumer, 76 EnrollmentStatusConsumer* status_consumer,
77 const policy::EnrollmentConfig& enrollment_config, 77 const policy::EnrollmentConfig& enrollment_config,
78 const std::string& enrolling_user_domain); 78 const std::string& enrolling_user_domain);
79 79
80 // Use |creator| instead of the default enrollment helper allocator. This 80 // Use |creator| instead of the default enrollment helper allocator. This
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // If this is not nullptr, then it will be used to create the enrollment 132 // If this is not nullptr, then it will be used to create the enrollment
133 // helper. |create_mock_enrollment_helper_| needs to outlive this class. 133 // helper. |create_mock_enrollment_helper_| needs to outlive this class.
134 static CreateMockEnrollmentHelper create_mock_enrollment_helper_; 134 static CreateMockEnrollmentHelper create_mock_enrollment_helper_;
135 135
136 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelper); 136 DISALLOW_COPY_AND_ASSIGN(EnterpriseEnrollmentHelper);
137 }; 137 };
138 138
139 } // namespace chromeos 139 } // namespace chromeos
140 140
141 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _H_ 141 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ENROLLMENT_ENTERPRISE_ENROLLMENT_HELPER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698