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

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

Issue 11308072: Include v2 packaged apps in sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 29 matching lines...) Expand all
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, 45 profile,
46 CreateFakeAppName(index), 46 CreateFakeAppName(index),
47 extensions::Extension::TYPE_HOSTED_APP); 47 extensions::Extension::TYPE_HOSTED_APP);
48 } 48 }
49 49
50 std::string InstallPlatformApp(Profile* profile, int index) {
51 return SyncExtensionHelper::GetInstance()->InstallExtension(
52 profile,
53 CreateFakeAppName(index),
akalin 2012/11/16 18:38:53 can you add a CreateFakePlatformAppName() function
Marijn Kruisselbrink 2012/11/16 18:54:30 Done.
Marijn Kruisselbrink 2012/11/19 18:43:01 Actually, I decided to undo this again (since this
54 extensions::Extension::TYPE_PLATFORM_APP);
55 }
56
50 std::string InstallAppForAllProfiles(int index) { 57 std::string InstallAppForAllProfiles(int index) {
51 for (int i = 0; i < test()->num_clients(); ++i) 58 for (int i = 0; i < test()->num_clients(); ++i)
52 InstallApp(test()->GetProfile(i), index); 59 InstallApp(test()->GetProfile(i), index);
53 return InstallApp(test()->verifier(), index); 60 return InstallApp(test()->verifier(), index);
54 } 61 }
55 62
56 void UninstallApp(Profile* profile, int index) { 63 void UninstallApp(Profile* profile, int index) {
57 return SyncExtensionHelper::GetInstance()->UninstallExtension( 64 return SyncExtensionHelper::GetInstance()->UninstallExtension(
58 profile, CreateFakeAppName(index)); 65 profile, CreateFakeAppName(index));
59 } 66 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index)); 121 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index));
115 SetAppLaunchOrdinalForApp( 122 SetAppLaunchOrdinalForApp(
116 destination, index, GetAppLaunchOrdinalForApp(source, index)); 123 destination, index, GetAppLaunchOrdinalForApp(source, index));
117 } 124 }
118 125
119 void FixNTPOrdinalCollisions(Profile* profile) { 126 void FixNTPOrdinalCollisions(Profile* profile) {
120 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile); 127 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile);
121 } 128 }
122 129
123 } // namespace apps_helper 130 } // namespace apps_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698