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

Unified Diff: chrome/browser/extensions/extension_sync_service.cc

Issue 295203002: Fixed sync regression for ephemeral apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_sync_service.h ('k') | chrome/browser/extensions/extension_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_sync_service.cc
diff --git a/chrome/browser/extensions/extension_sync_service.cc b/chrome/browser/extensions/extension_sync_service.cc
index ae8b8197a192603006df60fd318f7c8adaf1e0e1..483659cb37da7cff10e56f4f919b9d07cb873bda 100644
--- a/chrome/browser/extensions/extension_sync_service.cc
+++ b/chrome/browser/extensions/extension_sync_service.cc
@@ -58,11 +58,6 @@ void OnWebApplicationInfoLoaded(
CreateOrUpdateBookmarkApp(extension_service.get(), synced_info);
}
-bool ShouldSyncApp(const Extension* extension, Profile* profile) {
- return extensions::sync_helper::IsSyncableApp(extension) &&
- !extensions::util::IsEphemeralApp(extension->id(), profile);
-}
-
} // namespace
ExtensionSyncService::ExtensionSyncService(Profile* profile,
@@ -103,7 +98,7 @@ syncer::SyncChange ExtensionSyncService::PrepareToSyncUninstallExtension(
// "back from the dead" style bugs, because sync will add-back the extension
// that was uninstalled here when MergeDataAndStartSyncing is called.
// See crbug.com/256795.
- if (ShouldSyncApp(extension, profile_)) {
+ if (extensions::util::ShouldSyncApp(extension, profile_)) {
if (app_sync_bundle_.IsSyncing())
return app_sync_bundle_.CreateSyncChangeToDelete(extension);
else if (extensions_ready && !flare_.is_null())
@@ -134,7 +129,7 @@ void ExtensionSyncService::SyncEnableExtension(
const extensions::Extension& extension) {
// Syncing may not have started yet, so handle pending enables.
- if (ShouldSyncApp(&extension, profile_))
+ if (extensions::util::ShouldSyncApp(&extension, profile_))
pending_app_enables_.OnExtensionEnabled(extension.id());
if (extensions::sync_helper::IsSyncableExtension(&extension))
@@ -147,7 +142,7 @@ void ExtensionSyncService::SyncDisableExtension(
const extensions::Extension& extension) {
// Syncing may not have started yet, so handle pending enables.
- if (ShouldSyncApp(&extension, profile_))
+ if (extensions::util::ShouldSyncApp(&extension, profile_))
pending_app_enables_.OnExtensionDisabled(extension.id());
if (extensions::sync_helper::IsSyncableExtension(&extension))
@@ -538,7 +533,7 @@ bool ExtensionSyncService::ProcessExtensionSyncDataHelper(
void ExtensionSyncService::SyncExtensionChangeIfNeeded(
const Extension& extension) {
- if (ShouldSyncApp(&extension, profile_)) {
+ if (extensions::util::ShouldSyncApp(&extension, profile_)) {
if (app_sync_bundle_.IsSyncing())
app_sync_bundle_.SyncChangeIfNeeded(extension);
else if (extension_service_->is_ready() && !flare_.is_null())
« no previous file with comments | « chrome/browser/extensions/extension_sync_service.h ('k') | chrome/browser/extensions/extension_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698