| OLD | NEW |
| 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/strings/string_number_conversions.h" | 8 #include "base/strings/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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 for (int i = 0; i < test()->num_clients(); ++i) | 58 for (int i = 0; i < test()->num_clients(); ++i) |
| 59 InstallApp(test()->GetProfile(i), index); | 59 InstallApp(test()->GetProfile(i), index); |
| 60 return InstallApp(test()->verifier(), index); | 60 return InstallApp(test()->verifier(), index); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void UninstallApp(Profile* profile, int index) { | 63 void UninstallApp(Profile* profile, int index) { |
| 64 return SyncExtensionHelper::GetInstance()->UninstallExtension( | 64 return SyncExtensionHelper::GetInstance()->UninstallExtension( |
| 65 profile, CreateFakeAppName(index)); | 65 profile, CreateFakeAppName(index)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void EnableApp(Profile* profile, int index) { |
| 69 return SyncExtensionHelper::GetInstance()->EnableExtension( |
| 70 profile, CreateFakeAppName(index)); |
| 71 } |
| 72 |
| 73 void DisableApp(Profile* profile, int index) { |
| 74 return SyncExtensionHelper::GetInstance()->DisableExtension( |
| 75 profile, CreateFakeAppName(index)); |
| 76 } |
| 77 |
| 68 void IncognitoEnableApp(Profile* profile, int index) { | 78 void IncognitoEnableApp(Profile* profile, int index) { |
| 69 return SyncExtensionHelper::GetInstance()->IncognitoEnableExtension( | 79 return SyncExtensionHelper::GetInstance()->IncognitoEnableExtension( |
| 70 profile, CreateFakeAppName(index)); | 80 profile, CreateFakeAppName(index)); |
| 71 } | 81 } |
| 72 | 82 |
| 73 void IncognitoDisableApp(Profile* profile, int index) { | 83 void IncognitoDisableApp(Profile* profile, int index) { |
| 74 return SyncExtensionHelper::GetInstance()->IncognitoDisableExtension( | 84 return SyncExtensionHelper::GetInstance()->IncognitoDisableExtension( |
| 75 profile, CreateFakeAppName(index)); | 85 profile, CreateFakeAppName(index)); |
| 76 } | 86 } |
| 77 | 87 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index)); | 120 SetPageOrdinalForApp(destination, index, GetPageOrdinalForApp(source, index)); |
| 111 SetAppLaunchOrdinalForApp( | 121 SetAppLaunchOrdinalForApp( |
| 112 destination, index, GetAppLaunchOrdinalForApp(source, index)); | 122 destination, index, GetAppLaunchOrdinalForApp(source, index)); |
| 113 } | 123 } |
| 114 | 124 |
| 115 void FixNTPOrdinalCollisions(Profile* profile) { | 125 void FixNTPOrdinalCollisions(Profile* profile) { |
| 116 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile); | 126 SyncAppHelper::GetInstance()->FixNTPOrdinalCollisions(profile); |
| 117 } | 127 } |
| 118 | 128 |
| 119 } // namespace apps_helper | 129 } // namespace apps_helper |
| OLD | NEW |