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

Side by Side Diff: chrome/browser/chromeos/login/owner_manager.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
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/login/owner_manager.h" 5 #include "chrome/browser/chromeos/login/owner_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 24 matching lines...) Expand all
35 35
36 BrowserThread::PostTask( 36 BrowserThread::PostTask(
37 thread_id, FROM_HERE, 37 thread_id, FROM_HERE,
38 NewRunnableMethod(this, &OwnerManager::CallKeyUpdateDelegate, d)); 38 NewRunnableMethod(this, &OwnerManager::CallKeyUpdateDelegate, d));
39 } 39 }
40 40
41 void OwnerManager::LoadOwnerKey() { 41 void OwnerManager::LoadOwnerKey() {
42 BootTimesLoader::Get()->AddLoginTimeMarker("LoadOwnerKeyStart", false); 42 BootTimesLoader::Get()->AddLoginTimeMarker("LoadOwnerKeyStart", false);
43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
44 VLOG(1) << "Loading owner key"; 44 VLOG(1) << "Loading owner key";
45 NotificationType result = NotificationType::OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED; 45 NotificationType result = chrome::OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED;
46 46
47 // If |public_key_| isn't empty, we already have the key, so don't 47 // If |public_key_| isn't empty, we already have the key, so don't
48 // try to import again. 48 // try to import again.
49 if (public_key_.empty() && 49 if (public_key_.empty() &&
50 !utils_->ImportPublicKey(utils_->GetOwnerKeyFilePath(), &public_key_)) { 50 !utils_->ImportPublicKey(utils_->GetOwnerKeyFilePath(), &public_key_)) {
51 result = NotificationType::OWNER_KEY_FETCH_ATTEMPT_FAILED; 51 result = chrome::OWNER_KEY_FETCH_ATTEMPT_FAILED;
52 } 52 }
53 53
54 // Whether we loaded the public key or not, send a notification indicating 54 // Whether we loaded the public key or not, send a notification indicating
55 // that we're done with this attempt. 55 // that we're done with this attempt.
56 BrowserThread::PostTask( 56 BrowserThread::PostTask(
57 BrowserThread::UI, FROM_HERE, 57 BrowserThread::UI, FROM_HERE,
58 NewRunnableMethod(this, 58 NewRunnableMethod(this,
59 &OwnerManager::SendNotification, 59 &OwnerManager::SendNotification,
60 result, 60 result,
61 NotificationService::NoDetails())); 61 NotificationService::NoDetails()));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 void OwnerManager::SendNotification(NotificationType type, 143 void OwnerManager::SendNotification(NotificationType type,
144 const NotificationDetails& details) { 144 const NotificationDetails& details) {
145 NotificationService::current()->Notify( 145 NotificationService::current()->Notify(
146 type, 146 type,
147 NotificationService::AllSources(), 147 NotificationService::AllSources(),
148 details); 148 details);
149 } 149 }
150 150
151 } // namespace chromeos 151 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698