Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
| 13 #include "components/sync_driver/sync_service_observer.h" | 13 #include "components/sync_driver/sync_service_observer.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
| 16 #include "content/public/browser/notification_source.h" | 16 #include "content/public/browser/notification_source.h" |
| 17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 class Thread; | 21 class Thread; |
| 22 } | 22 } |
| 23 | 23 |
| 24 void EmptyNetworkTimeUpdate(const base::Time&, | |
|
Nicolas Zea
2015/10/28 20:33:18
forward declare Time and TimeDelta?
Nicolas Zea
2015/10/28 20:33:18
nit: Add a comment about what this is for (and the
maxbogue
2015/10/28 23:19:11
Done.
maxbogue
2015/10/28 23:19:11
Done.
| |
| 25 const base::TimeDelta&, | |
| 26 const base::TimeDelta&); | |
| 27 | |
| 24 ACTION_P(Notify, type) { | 28 ACTION_P(Notify, type) { |
| 25 content::NotificationService::current()->Notify( | 29 content::NotificationService::current()->Notify( |
| 26 type, | 30 type, |
| 27 content::NotificationService::AllSources(), | 31 content::NotificationService::AllSources(), |
| 28 content::NotificationService::NoDetails()); | 32 content::NotificationService::NoDetails()); |
| 29 } | 33 } |
| 30 | 34 |
| 31 ACTION(QuitUIMessageLoop) { | 35 ACTION(QuitUIMessageLoop) { |
| 32 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 36 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 33 base::MessageLoop::current()->QuitWhenIdle(); | 37 base::MessageLoop::current()->QuitWhenIdle(); |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 58 | 62 |
| 59 void NotifyTask(int type, | 63 void NotifyTask(int type, |
| 60 const content::NotificationSource& source, | 64 const content::NotificationSource& source, |
| 61 const content::NotificationDetails& details); | 65 const content::NotificationDetails& details); |
| 62 | 66 |
| 63 base::WaitableEvent done_event_; | 67 base::WaitableEvent done_event_; |
| 64 base::Thread* notify_thread_; | 68 base::Thread* notify_thread_; |
| 65 }; | 69 }; |
| 66 | 70 |
| 67 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ | 71 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ |
| OLD | NEW |