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

Unified Diff: chrome/browser/sync/test/integration/sync_app_helper.cc

Issue 93883004: Sync the launch type pref for apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unfix nit because it prevents testing of how invalid values are handled Created 6 years, 11 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
Index: chrome/browser/sync/test/integration/sync_app_helper.cc
diff --git a/chrome/browser/sync/test/integration/sync_app_helper.cc b/chrome/browser/sync/test/integration/sync_app_helper.cc
index 5e1f8458e5f52f6444cd4f7d7e66895c4a3ed117..cde49edaee7f599c57f71bd18db10c3a74959e5e 100644
--- a/chrome/browser/sync/test/integration/sync_app_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_app_helper.cc
@@ -6,10 +6,12 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/extensions_helper.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_extension_helper.h"
+#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/sync_helper.h"
#include "extensions/browser/app_sorting.h"
#include "extensions/common/extension.h"
@@ -26,11 +28,12 @@ struct AppState {
syncer::StringOrdinal app_launch_ordinal;
syncer::StringOrdinal page_ordinal;
+ extensions::LaunchType launch_type;
};
typedef std::map<std::string, AppState> AppStateMap;
-AppState::AppState() {}
+AppState::AppState() : launch_type(extensions::LAUNCH_TYPE_INVALID) {}
AppState::~AppState() {}
@@ -40,7 +43,8 @@ bool AppState::IsValid() const {
bool AppState::Equals(const AppState& other) const {
return app_launch_ordinal.Equals(other.app_launch_ordinal) &&
- page_ordinal.Equals(other.page_ordinal);
+ page_ordinal.Equals(other.page_ordinal) &&
+ launch_type == other.launch_type;
}
// Load all the app specific values for |id| into |app_state|.
@@ -51,6 +55,9 @@ void LoadApp(ExtensionService* extension_service,
app_sorting()->GetAppLaunchOrdinal(id);
app_state->page_ordinal = extension_service->extension_prefs()->
app_sorting()->GetPageOrdinal(id);
+ app_state->launch_type =
+ extensions::GetLaunchTypePrefValue(extension_service->extension_prefs(),
+ id);
}
// Returns a map from |profile|'s installed extensions to their state.
« no previous file with comments | « chrome/browser/extensions/launch_util.cc ('k') | chrome/browser/sync/test/integration/two_client_apps_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698