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

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

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 #include "chrome/browser/sync/test/integration/apps_helper.h" 5 #include "chrome/browser/sync/test/integration/apps_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/test/integration/sync_app_helper.h" 10 #include "chrome/browser/sync/test/integration/sync_app_helper.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void IncognitoDisableApp(Profile* profile, int index) { 76 void IncognitoDisableApp(Profile* profile, int index) {
77 return SyncExtensionHelper::GetInstance()->IncognitoDisableExtension( 77 return SyncExtensionHelper::GetInstance()->IncognitoDisableExtension(
78 profile, CreateFakeAppName(index)); 78 profile, CreateFakeAppName(index));
79 } 79 }
80 80
81 void InstallAppsPendingForSync(Profile* profile) { 81 void InstallAppsPendingForSync(Profile* profile) {
82 SyncExtensionHelper::GetInstance()->InstallExtensionsPendingForSync( 82 SyncExtensionHelper::GetInstance()->InstallExtensionsPendingForSync(
83 profile, extensions::Extension::TYPE_HOSTED_APP); 83 profile, extensions::Extension::TYPE_HOSTED_APP);
84 } 84 }
85 85
86 StringOrdinal GetPageOrdinalForApp(Profile* profile, 86 syncer::StringOrdinal GetPageOrdinalForApp(Profile* profile,
87 int app_index) { 87 int app_index) {
88 return SyncAppHelper::GetInstance()->GetPageOrdinalForApp( 88 return SyncAppHelper::GetInstance()->GetPageOrdinalForApp(
89 profile, CreateFakeAppName(app_index)); 89 profile, CreateFakeAppName(app_index));
90 } 90 }
91 91
92 void SetPageOrdinalForApp(Profile* profile, 92 void SetPageOrdinalForApp(Profile* profile,
93 int app_index, 93 int app_index,
94 const StringOrdinal& page_ordinal) { 94 const syncer::StringOrdinal& page_ordinal) {
95 SyncAppHelper::GetInstance()->SetPageOrdinalForApp( 95 SyncAppHelper::GetInstance()->SetPageOrdinalForApp(
96 profile, CreateFakeAppName(app_index), page_ordinal); 96 profile, CreateFakeAppName(app_index), page_ordinal);
97 } 97 }
98 98
99 StringOrdinal GetAppLaunchOrdinalForApp(Profile* profile, 99 syncer::StringOrdinal GetAppLaunchOrdinalForApp(Profile* profile,
100 int app_index) { 100 int app_index) {
101 return SyncAppHelper::GetInstance()->GetAppLaunchOrdinalForApp( 101 return SyncAppHelper::GetInstance()->GetAppLaunchOrdinalForApp(
102 profile, CreateFakeAppName(app_index)); 102 profile, CreateFakeAppName(app_index));
103 } 103 }
104 104
105 void SetAppLaunchOrdinalForApp(Profile* profile, 105 void SetAppLaunchOrdinalForApp(
106 int app_index, 106 Profile* profile,
107 const StringOrdinal& app_launch_ordinal) { 107 int app_index,
108 const syncer::StringOrdinal& app_launch_ordinal) {
108 SyncAppHelper::GetInstance()->SetAppLaunchOrdinalForApp( 109 SyncAppHelper::GetInstance()->SetAppLaunchOrdinalForApp(
109 profile, CreateFakeAppName(app_index), app_launch_ordinal); 110 profile, CreateFakeAppName(app_index), app_launch_ordinal);
110 } 111 }
111 112
112 void CopyNTPOrdinals(Profile* source, Profile* destination, int index) { 113 void CopyNTPOrdinals(Profile* source, Profile* destination, int index) {
113 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index)); 114 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index));
114 SetAppLaunchOrdinalForApp( 115 SetAppLaunchOrdinalForApp(
115 destination, index, GetAppLaunchOrdinalForApp(source, index)); 116 destination, index, GetAppLaunchOrdinalForApp(source, index));
116 } 117 }
117 118
118 void FixNTPOrdinalCollisions(Profile* profile) { 119 void FixNTPOrdinalCollisions(Profile* profile) {
119 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile); 120 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile);
120 } 121 }
121 122
122 } // namespace apps_helper 123 } // namespace apps_helper
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/apps_helper.h ('k') | chrome/browser/sync/test/integration/sync_app_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698