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

Side by Side Diff: chrome/browser/chromeos/cros/login_library.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/boot_times_loader.cc ('k') | chrome/browser/chromeos/cros_settings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "chrome/browser/chromeos/cros/cros_library.h" 11 #include "chrome/browser/chromeos/cros/cros_library.h"
12 #include "chrome/browser/chromeos/login/signed_settings.h" 12 #include "chrome/browser/chromeos/login/signed_settings.h"
13 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h" 13 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
14 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 14 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
15 #include "chrome/browser/prefs/pref_service.h" 15 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/common/chrome_notification_types.h"
16 #include "content/browser/browser_thread.h" 17 #include "content/browser/browser_thread.h"
17 #include "content/common/notification_service.h" 18 #include "content/common/notification_service.h"
18 #include "content/common/notification_type.h"
19 19
20 namespace em = enterprise_management; 20 namespace em = enterprise_management;
21 namespace chromeos { 21 namespace chromeos {
22 22
23 LoginLibrary::~LoginLibrary() {} 23 LoginLibrary::~LoginLibrary() {}
24 24
25 class LoginLibraryImpl : public LoginLibrary { 25 class LoginLibraryImpl : public LoginLibrary {
26 public: 26 public:
27 LoginLibraryImpl() : job_restart_request_(NULL) { 27 LoginLibraryImpl() : job_restart_request_(NULL) {
28 if (CrosLibrary::Get()->EnsureLoaded()) 28 if (CrosLibrary::Get()->EnsureLoaded())
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 break; 164 break;
165 } 165 }
166 } 166 }
167 167
168 void Init() { 168 void Init() {
169 session_connection_ = chromeos::MonitorSession(&Handler, this); 169 session_connection_ = chromeos::MonitorSession(&Handler, this);
170 } 170 }
171 171
172 void CompleteSetOwnerKey(bool value) { 172 void CompleteSetOwnerKey(bool value) {
173 VLOG(1) << "Owner key generation: " << (value ? "success" : "fail"); 173 VLOG(1) << "Owner key generation: " << (value ? "success" : "fail");
174 NotificationType result = 174 int result =
175 NotificationType::OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED; 175 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED;
176 if (!value) 176 if (!value)
177 result = NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED; 177 result = chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_FAILED;
178 178
179 // Whether we exported the public key or not, send a notification indicating 179 // Whether we exported the public key or not, send a notification indicating
180 // that we're done with this attempt. 180 // that we're done with this attempt.
181 NotificationService::current()->Notify(result, 181 NotificationService::current()->Notify(result,
182 NotificationService::AllSources(), 182 NotificationService::AllSources(),
183 NotificationService::NoDetails()); 183 NotificationService::NoDetails());
184 184
185 // We stored some settings in transient storage before owner was assigned. 185 // We stored some settings in transient storage before owner was assigned.
186 // Now owner is assigned and key is generated and we should persist 186 // Now owner is assigned and key is generated and we should persist
187 // those settings into signed storage. 187 // those settings into signed storage.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // static 235 // static
236 LoginLibrary* LoginLibrary::GetImpl(bool stub) { 236 LoginLibrary* LoginLibrary::GetImpl(bool stub) {
237 if (stub) 237 if (stub)
238 return new LoginLibraryStubImpl(); 238 return new LoginLibraryStubImpl();
239 else 239 else
240 return new LoginLibraryImpl(); 240 return new LoginLibraryImpl();
241 } 241 }
242 242
243 } // namespace chromeos 243 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/boot_times_loader.cc ('k') | chrome/browser/chromeos/cros_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698