| 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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "sync/api/string_ordinal.h" | 12 #include "sync/api/string_ordinal.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 class SyncTest; | 15 class SyncTest; |
| 16 | 16 |
| 17 namespace app_list { |
| 18 class AppListItem; |
| 19 } |
| 20 |
| 17 class SyncAppListHelper { | 21 class SyncAppListHelper { |
| 18 public: | 22 public: |
| 19 // Singleton implementation. | 23 // Singleton implementation. |
| 20 static SyncAppListHelper* GetInstance(); | 24 static SyncAppListHelper* GetInstance(); |
| 21 | 25 |
| 22 // Initializes the profiles in |test| and registers them with | 26 // Initializes the profiles in |test| and registers them with |
| 23 // internal data structures. | 27 // internal data structures. |
| 24 void SetupIfNecessary(SyncTest* test); | 28 void SetupIfNecessary(SyncTest* test); |
| 25 | 29 |
| 26 // Returns true iff all existing profiles have the same app list entries | 30 // Returns true iff all existing profiles have the same app list entries |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 private: | 43 private: |
| 40 friend struct DefaultSingletonTraits<SyncAppListHelper>; | 44 friend struct DefaultSingletonTraits<SyncAppListHelper>; |
| 41 | 45 |
| 42 SyncAppListHelper(); | 46 SyncAppListHelper(); |
| 43 ~SyncAppListHelper(); | 47 ~SyncAppListHelper(); |
| 44 | 48 |
| 45 // Returns true iff |profile| has the same app list as |test_|->verifier() | 49 // Returns true iff |profile| has the same app list as |test_|->verifier() |
| 46 // and the app list entries all have the same state. | 50 // and the app list entries all have the same state. |
| 47 bool AppListMatchesVerifier(Profile* profile); | 51 bool AppListMatchesVerifier(Profile* profile); |
| 48 | 52 |
| 53 // Helper function for debugging, logs info for an item. |
| 54 void PrintItem(Profile* profile, |
| 55 app_list::AppListItem* item, |
| 56 const std::string& label); |
| 57 |
| 49 SyncTest* test_; | 58 SyncTest* test_; |
| 50 bool setup_completed_; | 59 bool setup_completed_; |
| 51 | 60 |
| 52 DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper); | 61 DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper); |
| 53 }; | 62 }; |
| 54 | 63 |
| 55 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ | 64 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ |
| OLD | NEW |