OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/integration/sync_app_list_helper.h" | 5 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 using app_list::AppListItemList; | 22 using app_list::AppListItemList; |
23 using app_list::AppListSyncableService; | 23 using app_list::AppListSyncableService; |
24 using app_list::AppListSyncableServiceFactory; | 24 using app_list::AppListSyncableServiceFactory; |
25 | 25 |
26 SyncAppListHelper* SyncAppListHelper::GetInstance() { | 26 SyncAppListHelper* SyncAppListHelper::GetInstance() { |
27 SyncAppListHelper* instance = base::Singleton<SyncAppListHelper>::get(); | 27 SyncAppListHelper* instance = base::Singleton<SyncAppListHelper>::get(); |
28 instance->SetupIfNecessary(sync_datatype_helper::test()); | 28 instance->SetupIfNecessary(sync_datatype_helper::test()); |
29 return instance; | 29 return instance; |
30 } | 30 } |
31 | 31 |
32 SyncAppListHelper::SyncAppListHelper() : test_(NULL), setup_completed_(false) {} | 32 SyncAppListHelper::SyncAppListHelper() |
| 33 : test_(nullptr), setup_completed_(false) {} |
33 | 34 |
34 SyncAppListHelper::~SyncAppListHelper() {} | 35 SyncAppListHelper::~SyncAppListHelper() {} |
35 | 36 |
36 void SyncAppListHelper::SetupIfNecessary(SyncTest* test) { | 37 void SyncAppListHelper::SetupIfNecessary(SyncTest* test) { |
37 if (setup_completed_) { | 38 if (setup_completed_) { |
38 DCHECK_EQ(test, test_); | 39 DCHECK_EQ(test, test_); |
39 return; | 40 return; |
40 } | 41 } |
41 test_ = test; | 42 test_ = test; |
42 for (auto* profile : test_->GetAllProfiles()) { | 43 for (auto* profile : test_->GetAllProfiles()) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 base::StringPrintf(" Folder Item(%d): ", static_cast<int>(i)); | 163 base::StringPrintf(" Folder Item(%d): ", static_cast<int>(i)); |
163 PrintItem(profile, child, child_label); | 164 PrintItem(profile, child, child_label); |
164 } | 165 } |
165 return; | 166 return; |
166 } | 167 } |
167 DVLOG(1) << label << item->ToDebugString() | 168 DVLOG(1) << label << item->ToDebugString() |
168 << " Page: " << s->GetPageOrdinal(id).ToDebugString().substr(0, 8) | 169 << " Page: " << s->GetPageOrdinal(id).ToDebugString().substr(0, 8) |
169 << " Item: " | 170 << " Item: " |
170 << s->GetAppLaunchOrdinal(id).ToDebugString().substr(0, 8); | 171 << s->GetAppLaunchOrdinal(id).ToDebugString().substr(0, 8); |
171 } | 172 } |
OLD | NEW |