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

Side by Side Diff: chrome/browser/sync/profile_sync_test_util.h

Issue 6380004: [Sync] Tidy up SyncBackendHost interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 28 matching lines...) Expand all
39 NotificationService::current()->Notify(type, 39 NotificationService::current()->Notify(type,
40 NotificationService::AllSources(), 40 NotificationService::AllSources(),
41 NotificationService::NoDetails()); 41 NotificationService::NoDetails());
42 } 42 }
43 43
44 ACTION(QuitUIMessageLoop) { 44 ACTION(QuitUIMessageLoop) {
45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 45 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
46 MessageLoop::current()->Quit(); 46 MessageLoop::current()->Quit();
47 } 47 }
48 48
49 ACTION_P(InvokeTask, task) {
50 if (task)
51 task->Run();
52 }
53
54 class TestModelAssociatorHelper { 49 class TestModelAssociatorHelper {
55 public: 50 public:
56 TestModelAssociatorHelper(browser_sync::TestIdFactory* id_factory) 51 explicit TestModelAssociatorHelper(browser_sync::TestIdFactory* id_factory)
57 : id_factory_(id_factory) { 52 : id_factory_(id_factory) {
58 } 53 }
59 54
60 template <class ModelAssociatorImpl> 55 template <class ModelAssociatorImpl>
61 bool GetSyncIdForTaggedNode(ModelAssociatorImpl* associator, 56 bool GetSyncIdForTaggedNode(ModelAssociatorImpl* associator,
62 const std::string& tag, int64* sync_id) { 57 const std::string& tag, int64* sync_id) {
63 std::wstring tag_wide; 58 std::wstring tag_wide;
64 if (!UTF8ToWide(tag.c_str(), tag.length(), &tag_wide)) { 59 if (!UTF8ToWide(tag.c_str(), tag.length(), &tag_wide)) {
65 NOTREACHED() << "Unable to convert UTF8 to wide for string: " << tag; 60 NOTREACHED() << "Unable to convert UTF8 to wide for string: " << tag;
66 return false; 61 return false;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const NotificationDetails& details) { 205 const NotificationDetails& details) {
211 NotificationService::current()->Notify(type, source, details); 206 NotificationService::current()->Notify(type, source, details);
212 done_event_.Signal(); 207 done_event_.Signal();
213 } 208 }
214 209
215 base::WaitableEvent done_event_; 210 base::WaitableEvent done_event_;
216 base::Thread* notify_thread_; 211 base::Thread* notify_thread_;
217 }; 212 };
218 213
219 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 214 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698