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

Side by Side Diff: chrome/browser/sync/test/integration/apps_helper.h

Issue 10920017: [Sync] Generalize StringOrdinal to handle ordinal_in_parent field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Relax tests Created 8 years, 3 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) 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_TEST_INTEGRATION_APPS_HELPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/test/integration/sync_test.h" 10 #include "chrome/browser/sync/test/integration/sync_test.h"
11 #include "chrome/common/string_ordinal.h" 11 #include "sync/api/string_ordinal.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 namespace apps_helper { 15 namespace apps_helper {
16 16
17 // Returns true iff the profile with index |index| has the same apps as the 17 // Returns true iff the profile with index |index| has the same apps as the
18 // verifier. 18 // verifier.
19 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; 19 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT;
20 20
21 // Returns true iff all existing profiles have the same apps as the verifier. 21 // Returns true iff all existing profiles have the same apps as the verifier.
(...skipping 21 matching lines...) Expand all
43 void DisableApp(Profile* profile, int index); 43 void DisableApp(Profile* profile, int index);
44 44
45 // Enables the app for the given index in incognito mode on |profile|. 45 // Enables the app for the given index in incognito mode on |profile|.
46 void IncognitoEnableApp(Profile* profile, int index); 46 void IncognitoEnableApp(Profile* profile, int index);
47 47
48 // Disables the app for the given index in incognito mode on |profile|. 48 // Disables the app for the given index in incognito mode on |profile|.
49 void IncognitoDisableApp(Profile* profile, int index); 49 void IncognitoDisableApp(Profile* profile, int index);
50 50
51 // Gets the page ordinal value for the application at the given index on 51 // Gets the page ordinal value for the application at the given index on
52 // |profile|. 52 // |profile|.
53 StringOrdinal GetPageOrdinalForApp(Profile* profile, int app_index); 53 syncer::StringOrdinal GetPageOrdinalForApp(Profile* profile, int app_index);
54 54
55 // Sets a new |page_ordinal| value for the application at the given index 55 // Sets a new |page_ordinal| value for the application at the given index
56 // on |profile|. 56 // on |profile|.
57 void SetPageOrdinalForApp( 57 void SetPageOrdinalForApp(
58 Profile* profile, int app_index, const StringOrdinal& page_ordinal); 58 Profile* profile, int app_index,
59 const syncer::StringOrdinal& page_ordinal);
59 60
60 // Gets the app launch ordinal value for the application at the given index on 61 // Gets the app launch ordinal value for the application at the given index on
61 // |profile|. 62 // |profile|.
62 StringOrdinal GetAppLaunchOrdinalForApp(Profile* profile, int app_index); 63 syncer::StringOrdinal GetAppLaunchOrdinalForApp(
64 Profile* profile, int app_index);
63 65
64 // Sets a new |page_ordinal| value for the application at the given index 66 // Sets a new |page_ordinal| value for the application at the given index
65 // on |profile|. 67 // on |profile|.
66 void SetAppLaunchOrdinalForApp( 68 void SetAppLaunchOrdinalForApp(
67 Profile* profile, int app_index, const StringOrdinal& app_launch_ordinal); 69 Profile* profile, int app_index,
70 const syncer::StringOrdinal& app_launch_ordinal);
68 71
69 // Copy the page and app launch ordinal value for the application at the given 72 // Copy the page and app launch ordinal value for the application at the given
70 // index on |profile_source| to |profile_destination|. 73 // index on |profile_source| to |profile_destination|.
71 // The main intention of this is to properly setup the values on the verifier 74 // The main intention of this is to properly setup the values on the verifier
72 // profile in situations where the other profiles have conflicting values. 75 // profile in situations where the other profiles have conflicting values.
73 void CopyNTPOrdinals(Profile* source, Profile* destination, int index); 76 void CopyNTPOrdinals(Profile* source, Profile* destination, int index);
74 77
75 // Fix any NTP icon collisions that are currently in |profile|. 78 // Fix any NTP icon collisions that are currently in |profile|.
76 void FixNTPOrdinalCollisions(Profile* profile); 79 void FixNTPOrdinalCollisions(Profile* profile);
77 80
78 } // namespace apps_helper 81 } // namespace apps_helper
79 82
80 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ 83 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698