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

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

Issue 9427001: Extend TwoClientExtensionSettingsSyncTest to test app settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 8 years, 10 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 27 matching lines...) Expand all
38 } 38 }
39 } 39 }
40 return true; 40 return true;
41 } 41 }
42 42
43 std::string InstallApp(Profile* profile, int index) { 43 std::string InstallApp(Profile* profile, int index) {
44 return SyncExtensionHelper::GetInstance()->InstallExtension( 44 return SyncExtensionHelper::GetInstance()->InstallExtension(
45 profile, CreateFakeAppName(index), Extension::TYPE_HOSTED_APP); 45 profile, CreateFakeAppName(index), Extension::TYPE_HOSTED_APP);
46 } 46 }
47 47
48 std::string InstallAppForAllProfiles(int index) {
49 for (int i = 0; i < test()->num_clients(); ++i)
50 InstallApp(test()->GetProfile(i), index);
51 return InstallApp(test()->verifier(), index);
52 }
53
48 void UninstallApp(Profile* profile, int index) { 54 void UninstallApp(Profile* profile, int index) {
49 return SyncExtensionHelper::GetInstance()->UninstallExtension( 55 return SyncExtensionHelper::GetInstance()->UninstallExtension(
50 profile, CreateFakeAppName(index)); 56 profile, CreateFakeAppName(index));
51 } 57 }
52 58
53 void EnableApp(Profile* profile, int index) { 59 void EnableApp(Profile* profile, int index) {
54 return SyncExtensionHelper::GetInstance()->EnableExtension( 60 return SyncExtensionHelper::GetInstance()->EnableExtension(
55 profile, CreateFakeAppName(index)); 61 profile, CreateFakeAppName(index));
56 } 62 }
57 63
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index)); 111 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index));
106 SetAppLaunchOrdinalForApp( 112 SetAppLaunchOrdinalForApp(
107 destination, index, GetAppLaunchOrdinalForApp(source, index)); 113 destination, index, GetAppLaunchOrdinalForApp(source, index));
108 } 114 }
109 115
110 void FixNTPOrdinalCollisions(Profile* profile) { 116 void FixNTPOrdinalCollisions(Profile* profile) {
111 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile); 117 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile);
112 } 118 }
113 119
114 } // namespace apps_helper 120 } // namespace apps_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698