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

Side by Side Diff: chrome/browser/chromeos/login/owner_manager_unittest.cc

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 #include "chrome/browser/chromeos/login/owner_manager_unittest.h" 6 #include "chrome/browser/chromeos/login/owner_manager_unittest.h"
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 21 matching lines...) Expand all
32 32
33 //////////////////////////////////////////////////////////////////////////////// 33 ////////////////////////////////////////////////////////////////////////////////
34 // MockKeyLoadObserver 34 // MockKeyLoadObserver
35 MockKeyLoadObserver::MockKeyLoadObserver(base::WaitableEvent* e) 35 MockKeyLoadObserver::MockKeyLoadObserver(base::WaitableEvent* e)
36 : success_expected_(false), 36 : success_expected_(false),
37 event_(e), 37 event_(e),
38 observed_(false) { 38 observed_(false) {
39 registrar_.Add( 39 registrar_.Add(
40 this, 40 this,
41 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_FAILED, 41 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_FAILED,
42 NotificationService::AllSources()); 42 content::NotificationService::AllSources());
43 registrar_.Add( 43 registrar_.Add(
44 this, 44 this,
45 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, 45 chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED,
46 NotificationService::AllSources()); 46 content::NotificationService::AllSources());
47 } 47 }
48 48
49 MockKeyLoadObserver::~MockKeyLoadObserver() { 49 MockKeyLoadObserver::~MockKeyLoadObserver() {
50 DCHECK(observed_); 50 DCHECK(observed_);
51 } 51 }
52 52
53 void MockKeyLoadObserver::Observe(int type, 53 void MockKeyLoadObserver::Observe(int type,
54 const content::NotificationSource& source, 54 const content::NotificationSource& source,
55 const content::NotificationDetails& details) { 55 const content::NotificationDetails& details) {
56 LOG(INFO) << "Observed key fetch event"; 56 LOG(INFO) << "Observed key fetch event";
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 BrowserThread::PostTask( 336 BrowserThread::PostTask(
337 BrowserThread::FILE, FROM_HERE, 337 BrowserThread::FILE, FROM_HERE,
338 base::Bind(&OwnerManager::Sign, manager.get(), BrowserThread::UI, data, 338 base::Bind(&OwnerManager::Sign, manager.get(), BrowserThread::UI, data,
339 &delegate)); 339 &delegate));
340 while (!event.IsSignaled()) 340 while (!event.IsSignaled())
341 message_loop_.RunAllPending(); 341 message_loop_.RunAllPending();
342 } 342 }
343 343
344 } // namespace chromeos 344 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698