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

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

Issue 93883004: Sync the launch type pref for apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test for invalid value, make tests actually check things Created 7 years 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/app_sync_data.cc ('k') | chrome/browser/extensions/launch_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 9aa0dd3240073cc21ae45bd8ae495184a9a0411f..e8a9fb63ec25b2b41aebd6b9d0b2e73f7ad4432f 100644
--- a/chrome/browser/extensions/extension_sync_service.cc
+++ b/chrome/browser/extensions/extension_sync_service.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/extension_sync_data.h"
#include "chrome/browser/extensions/extension_sync_service_factory.h"
#include "chrome/browser/extensions/extension_util.h"
+#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/glue/sync_start_util.h"
#include "chrome/browser/sync/sync_prefs.h"
@@ -239,7 +240,9 @@ extensions::AppSyncData ExtensionSyncService::GetAppSyncData(
extension_service_->IsExtensionEnabled(extension.id()),
extension_util::IsIncognitoEnabled(extension.id(), extension_service_),
extension_prefs_->app_sorting()->GetAppLaunchOrdinal(extension.id()),
- extension_prefs_->app_sorting()->GetPageOrdinal(extension.id()));
+ extension_prefs_->app_sorting()->GetPageOrdinal(extension.id()),
+ extensions::GetLaunchTypePrefValue(extension_prefs_, extension.id()));
+
}
std::vector<extensions::ExtensionSyncData>
@@ -307,6 +310,12 @@ bool ExtensionSyncService::ProcessAppSyncData(
app_sync_data.page_ordinal());
}
+ if (app_sync_data.launch_type() >= extensions::LAUNCH_TYPE_FIRST &&
+ app_sync_data.launch_type() < extensions::NUM_LAUNCH_TYPES) {
benwells 2014/01/06 05:56:31 Nit: Could this check move into AppSyncData::Popul
calamity 2014/01/07 03:29:42 Done.
+ extensions::SetLaunchType(extension_service_, id,
+ static_cast<extensions::LaunchType>(app_sync_data.launch_type()));
benwells 2014/01/06 05:56:31 Nit: why is this static cast needed? The type is a
calamity 2014/01/07 03:29:42 Done.
+ }
+
if (!ProcessExtensionSyncDataHelper(app_sync_data.extension_sync_data(),
syncer::APPS)) {
app_sync_bundle_.AddPendingApp(id, app_sync_data);
« no previous file with comments | « chrome/browser/extensions/app_sync_data.cc ('k') | chrome/browser/extensions/launch_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698