Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / sync / test / integration / sync_app_helper.h
blob05398a5529a0f93b18629583f60bac04b11f75db
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_HELPER_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/singleton.h"
12 #include "sync/api/string_ordinal.h"
14 class Profile;
15 class SyncTest;
17 class SyncAppHelper {
18 public:
19 // Singleton implementation.
20 static SyncAppHelper* GetInstance();
22 // Initializes the profiles in |test| and registers them with
23 // internal data structures.
24 void SetupIfNecessary(SyncTest* test);
26 // Returns true iff |profile1| and |profile2| have the same apps and
27 // they are all in the same state.
28 bool AppStatesMatch(Profile* profile1, Profile* profile2);
30 // Gets the page ordinal value for the applications with |name| in |profile|.
31 syncer::StringOrdinal GetPageOrdinalForApp(Profile* profile,
32 const std::string& name);
34 // Sets a new |page_ordinal| value for the application with |name| in
35 // |profile|.
36 void SetPageOrdinalForApp(Profile* profile,
37 const std::string& name,
38 const syncer::StringOrdinal& page_ordinal);
40 // Gets the app launch ordinal value for the application with |name| in
41 // |profile|.
42 syncer::StringOrdinal GetAppLaunchOrdinalForApp(Profile* profile,
43 const std::string& name);
45 // Sets a new |app_launch_ordinal| value for the application with |name| in
46 // |profile|.
47 void SetAppLaunchOrdinalForApp(
48 Profile* profile,
49 const std::string& name,
50 const syncer::StringOrdinal& app_launch_ordinal);
52 // Fix any NTP icon collisions that are currently in |profile|.
53 void FixNTPOrdinalCollisions(Profile* profile);
55 private:
56 friend struct DefaultSingletonTraits<SyncAppHelper>;
58 SyncAppHelper();
59 ~SyncAppHelper();
61 bool setup_completed_;
63 DISALLOW_COPY_AND_ASSIGN(SyncAppHelper);
66 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_HELPER_H_