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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 10920017: [Sync] Generalize StringOrdinal to handle ordinal_in_parent field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Relax tests Created 8 years, 3 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/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 75cda30d61b3e66ff88c4b35cc7d9e6ffeb722c4..2089aa7cbf7da52e50d829e342894c9a4b47ec1f 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -165,7 +165,7 @@ void AppLauncherHandler::CreateAppInfo(
value->Set("notification", SerializeNotification(*notification));
ExtensionSorting* sorting = prefs->extension_sorting();
- StringOrdinal page_ordinal = sorting->GetPageOrdinal(extension->id());
+ syncer::StringOrdinal page_ordinal = sorting->GetPageOrdinal(extension->id());
if (!page_ordinal.IsValid()) {
// Make sure every app has a page ordinal (some predate the page ordinal).
// The webstore app should be on the first page.
@@ -177,7 +177,7 @@ void AppLauncherHandler::CreateAppInfo(
value->SetInteger("page_index",
sorting->PageStringOrdinalAsInteger(page_ordinal));
- StringOrdinal app_launch_ordinal =
+ syncer::StringOrdinal app_launch_ordinal =
sorting->GetAppLaunchOrdinal(extension->id());
if (!app_launch_ordinal.IsValid()) {
// Make sure every app has a launch ordinal (some predate the launch
@@ -188,7 +188,7 @@ void AppLauncherHandler::CreateAppInfo(
sorting->CreateNextAppLaunchOrdinal(page_ordinal);
sorting->SetAppLaunchOrdinal(extension->id(), app_launch_ordinal);
}
- value->SetString("app_launch_ordinal", app_launch_ordinal.ToString());
+ value->SetString("app_launch_ordinal", app_launch_ordinal.ToInternalValue());
}
void AppLauncherHandler::RegisterMessages() {
@@ -652,7 +652,7 @@ void AppLauncherHandler::HandleSetPageIndex(const ListValue* args) {
double page_index;
CHECK(args->GetString(0, &extension_id));
CHECK(args->GetDouble(1, &page_index));
- const StringOrdinal& page_ordinal =
+ const syncer::StringOrdinal& page_ordinal =
extension_sorting->PageIntegerAsStringOrdinal(
static_cast<size_t>(page_index));
@@ -687,7 +687,7 @@ void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) {
CHECK(args->GetDouble(2, &page_index));
ExtensionSorting* extension_sorting =
extension_service_->extension_prefs()->extension_sorting();
- const StringOrdinal& page_ordinal =
+ const syncer::StringOrdinal& page_ordinal =
extension_sorting->PageIntegerAsStringOrdinal(
static_cast<size_t>(page_index));
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698