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

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

Issue 1851243002: [Sync] Eliminate verifier profile from sync_integration_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not remove AwaitQuiescence() Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/apps_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/sync/test/integration/sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "sync/api/string_ordinal.h" 10 #include "sync/api/string_ordinal.h"
11 11
12 class Profile; 12 class Profile;
13 13
14 namespace apps_helper { 14 namespace apps_helper {
15 15
16 // Returns true iff the profile with index |index| has the same apps (hosted, 16 // Returns true iff |profile1| has same apps (hosted, legacy packaged and
17 // legacy packaged and platform) as the verifier. 17 // platform) as |profile2|.
18 bool HasSameAppsAsVerifier(int index) WARN_UNUSED_RESULT; 18 bool HasSameApps(Profile* profile1, Profile* profile2);
19 19
20 // Returns true iff all existing profiles have the same apps (hosted, 20 // Returns true iff all existing profiles have the same apps (hosted,
21 // legacy packaged and platform) as the verifier. 21 // legacy packaged and platform).
22 bool AllProfilesHaveSameAppsAsVerifier() WARN_UNUSED_RESULT; 22 bool AllProfilesHaveSameApps() WARN_UNUSED_RESULT;
23 23
24 // Installs the app for the given index to |profile|, and returns the extension 24 // Installs the app for the given index to |profile|, and returns the extension
25 // ID of the new app. 25 // ID of the new app.
26 std::string InstallApp(Profile* profile, int index); 26 std::string InstallApp(Profile* profile, int index);
27 27
28 // Installs the platform app for the given index to |profile|, and returns the 28 // Installs the platform app for the given index to |profile|, and returns the
29 // extension ID of the new app. Indices passed to this method should be distinct 29 // extension ID of the new app. Indices passed to this method should be distinct
30 // from indices passed to InstallApp. 30 // from indices passed to InstallApp.
31 std::string InstallPlatformApp(Profile* profile, int index); 31 std::string InstallPlatformApp(Profile* profile, int index);
32 32
33 // Installs the app for the given index to all profiles (including the 33 // Installs the app for the given index to all profiles (including the
34 // verifier), and returns the extension ID of the new app. 34 // verifier), and returns the extension ID of the new app.
35 std::string InstallAppForAllProfiles(int index); 35 std::string InstallAppForAllProfiles(int index);
36 36
37 // Uninstalls the app for the given index from |profile|. Assumes that it was 37 // Uninstalls the app for the given index from |profile|. Assumes that it was
38 // previously installed. 38 // previously installed.
39 void UninstallApp(Profile* profile, int index); 39 void UninstallApp(Profile* profile, int index);
40 40
41 // Installs all pending synced apps for |profile|. 41 // Installs all pending synced apps for |profile|.
42 void InstallAppsPendingForSync(Profile* profile); 42 void InstallAppsPendingForSync(Profile* profile);
43 43
44 // Enables the app for the given index on |profile|. 44 // Enables the app for the given index on |profile|.
45 void EnableApp(Profile* profile, int index); 45 void EnableApp(Profile* profile, int index);
46 46
47 // Disables the app for the given index on |profile|. 47 // Disables the app for the given index on |profile|.
48 void DisableApp(Profile* profile, int index); 48 void DisableApp(Profile* profile, int index);
49 49
50 // Returns true if the app with index |index| is enabled on |profile|.
51 bool IsAppEnabled(Profile* profile, int index);
52
50 // Enables the app for the given index in incognito mode on |profile|. 53 // Enables the app for the given index in incognito mode on |profile|.
51 void IncognitoEnableApp(Profile* profile, int index); 54 void IncognitoEnableApp(Profile* profile, int index);
52 55
53 // Disables the app for the given index in incognito mode on |profile|. 56 // Disables the app for the given index in incognito mode on |profile|.
54 void IncognitoDisableApp(Profile* profile, int index); 57 void IncognitoDisableApp(Profile* profile, int index);
55 58
59 // Returns true if the app with index |index| is enabled in incognito mode on
60 // |profile|.
61 bool IsIncognitoEnabled(Profile* profile, int index);
62
56 // Gets the page ordinal value for the application at the given index on 63 // Gets the page ordinal value for the application at the given index on
57 // |profile|. 64 // |profile|.
58 syncer::StringOrdinal GetPageOrdinalForApp(Profile* profile, int app_index); 65 syncer::StringOrdinal GetPageOrdinalForApp(Profile* profile, int app_index);
59 66
60 // Sets a new |page_ordinal| value for the application at the given index 67 // Sets a new |page_ordinal| value for the application at the given index
61 // on |profile|. 68 // on |profile|.
62 void SetPageOrdinalForApp( 69 void SetPageOrdinalForApp(
63 Profile* profile, int app_index, 70 Profile* profile, int app_index,
64 const syncer::StringOrdinal& page_ordinal); 71 const syncer::StringOrdinal& page_ordinal);
65 72
(...skipping 19 matching lines...) Expand all
85 92
86 // Waits until all profiles have the same set of apps. In case verifier profile 93 // Waits until all profiles have the same set of apps. In case verifier profile
87 // is enabled, it waits until all profiles match the verifier. 94 // is enabled, it waits until all profiles match the verifier.
88 // 95 //
89 // Returns false on time out. 96 // Returns false on time out.
90 bool AwaitAllProfilesHaveSameApps(); 97 bool AwaitAllProfilesHaveSameApps();
91 98
92 } // namespace apps_helper 99 } // namespace apps_helper
93 100
94 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_ 101 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_APPS_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/apps_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698