OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/cros/login_library.h" | 5 #include "chrome/browser/chromeos/cros/login_library.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 | 158 |
159 static void Handler(void* object, const OwnershipEvent& event) { | 159 static void Handler(void* object, const OwnershipEvent& event) { |
160 LoginLibraryImpl* self = static_cast<LoginLibraryImpl*>(object); | 160 LoginLibraryImpl* self = static_cast<LoginLibraryImpl*>(object); |
161 switch (event) { | 161 switch (event) { |
162 case SetKeySuccess: | 162 case SetKeySuccess: |
163 self->CompleteSetOwnerKey(true); | 163 self->CompleteSetOwnerKey(true); |
164 break; | 164 break; |
165 case SetKeyFailure: | 165 case SetKeyFailure: |
166 self->CompleteSetOwnerKey(false); | 166 self->CompleteSetOwnerKey(false); |
167 break; | 167 break; |
168 case WhitelistOpSuccess: | |
169 self->CompleteWhitelistOp(true); | |
170 break; | |
171 case WhitelistOpFailure: | |
172 self->CompleteWhitelistOp(false); | |
173 break; | |
174 case PropertyOpSuccess: | 168 case PropertyOpSuccess: |
175 self->CompletePropertyOp(true); | 169 self->CompletePropertyOp(true); |
176 break; | 170 break; |
177 case PropertyOpFailure: | 171 case PropertyOpFailure: |
178 self->CompletePropertyOp(false); | 172 self->CompletePropertyOp(false); |
179 break; | 173 break; |
174 case WhitelistOpSuccess: | |
175 case WhitelistOpFailure: | |
176 // DEPRECATED. | |
Denis Lagno
2011/10/14 15:22:00
nit: it is not a macro to be all-CAPS:)
| |
180 default: | 177 default: |
181 NOTREACHED(); | 178 NOTREACHED(); |
182 break; | 179 break; |
183 } | 180 } |
184 } | 181 } |
185 | 182 |
186 void CompleteSetOwnerKey(bool value) { | 183 void CompleteSetOwnerKey(bool value) { |
187 VLOG(1) << "Owner key generation: " << (value ? "success" : "fail"); | 184 VLOG(1) << "Owner key generation: " << (value ? "success" : "fail"); |
188 int result = | 185 int result = |
189 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED; | 186 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 LoginLibrary* impl; | 259 LoginLibrary* impl; |
263 if (stub) | 260 if (stub) |
264 impl = new LoginLibraryStubImpl(); | 261 impl = new LoginLibraryStubImpl(); |
265 else | 262 else |
266 impl = new LoginLibraryImpl(); | 263 impl = new LoginLibraryImpl(); |
267 impl->Init(); | 264 impl->Init(); |
268 return impl; | 265 return impl; |
269 } | 266 } |
270 | 267 |
271 } // namespace chromeos | 268 } // namespace chromeos |
OLD | NEW |