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

Side by Side Diff: chrome/browser/sync/profile_sync_test_util.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/sync/profile_sync_test_util.h ('k') | chrome/browser/sync/signin_manager.h » ('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/sync/profile_sync_test_util.h" 5 #include "chrome/browser/sync/profile_sync_test_util.h"
6 6
7 #include "base/task.h" 7 #include "base/task.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 9
10 ProfileSyncServiceObserverMock::ProfileSyncServiceObserverMock() {} 10 ProfileSyncServiceObserverMock::ProfileSyncServiceObserverMock() {}
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void ThreadNotificationService::TearDownTask() { 43 void ThreadNotificationService::TearDownTask() {
44 service_.reset(NULL); 44 service_.reset(NULL);
45 done_event_.Signal(); 45 done_event_.Signal();
46 } 46 }
47 47
48 ThreadNotifier::ThreadNotifier(base::Thread* notify_thread) 48 ThreadNotifier::ThreadNotifier(base::Thread* notify_thread)
49 : done_event_(false, false), 49 : done_event_(false, false),
50 notify_thread_(notify_thread) {} 50 notify_thread_(notify_thread) {}
51 51
52 void ThreadNotifier::Notify(NotificationType type, 52 void ThreadNotifier::Notify(int type,
53 const NotificationDetails& details) { 53 const NotificationDetails& details) {
54 Notify(type, NotificationService::AllSources(), details); 54 Notify(type, NotificationService::AllSources(), details);
55 } 55 }
56 56
57 void ThreadNotifier::Notify(NotificationType type, 57 void ThreadNotifier::Notify(int type,
58 const NotificationSource& source, 58 const NotificationSource& source,
59 const NotificationDetails& details) { 59 const NotificationDetails& details) {
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
61 notify_thread_->message_loop()->PostTask( 61 notify_thread_->message_loop()->PostTask(
62 FROM_HERE, 62 FROM_HERE,
63 NewRunnableMethod(this, 63 NewRunnableMethod(this,
64 &ThreadNotifier::NotifyTask, 64 &ThreadNotifier::NotifyTask,
65 type, 65 type,
66 source, 66 source,
67 details)); 67 details));
68 done_event_.Wait(); 68 done_event_.Wait();
69 } 69 }
70 70
71 ThreadNotifier::~ThreadNotifier() {} 71 ThreadNotifier::~ThreadNotifier() {}
72 72
73 void ThreadNotifier::NotifyTask(NotificationType type, 73 void ThreadNotifier::NotifyTask(int type,
74 const NotificationSource& source, 74 const NotificationSource& source,
75 const NotificationDetails& details) { 75 const NotificationDetails& details) {
76 NotificationService::current()->Notify(type, source, details); 76 NotificationService::current()->Notify(type, source, details);
77 done_event_.Signal(); 77 done_event_.Signal();
78 } 78 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_test_util.h ('k') | chrome/browser/sync/signin_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698