Files.app: Remove old style for buttons.
[chromium-blink-merge.git] / extensions / browser / null_app_sorting.cc
blob855de55dc4a124cc21176995fb2e4e082a1136b9
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/browser/null_app_sorting.h"
7 #include "sync/api/string_ordinal.h"
9 namespace {
11 // Ordinals for a single app on a single page.
12 const char kFirstApp[] = "a";
13 const char kNextApp[] = "b";
14 const char kFirstPage[] = "a";
16 } // namespace
18 namespace extensions {
20 NullAppSorting::NullAppSorting() {
23 NullAppSorting::~NullAppSorting() {
26 void NullAppSorting::SetExtensionScopedPrefs(ExtensionScopedPrefs* prefs) {
29 void NullAppSorting::CheckExtensionScopedPrefs() const {
32 void NullAppSorting::SetExtensionSyncService(
33 ExtensionSyncService* extension_sync_service) {
36 void NullAppSorting::Initialize(const ExtensionIdList& extension_ids) {
39 void NullAppSorting::FixNTPOrdinalCollisions() {
42 void NullAppSorting::EnsureValidOrdinals(
43 const std::string& extension_id,
44 const syncer::StringOrdinal& suggested_page) {
47 void NullAppSorting::OnExtensionMoved(
48 const std::string& moved_extension_id,
49 const std::string& predecessor_extension_id,
50 const std::string& successor_extension_id) {
53 syncer::StringOrdinal NullAppSorting::GetAppLaunchOrdinal(
54 const std::string& extension_id) const {
55 return syncer::StringOrdinal(kFirstApp);
58 void NullAppSorting::SetAppLaunchOrdinal(
59 const std::string& extension_id,
60 const syncer::StringOrdinal& new_app_launch_ordinal) {
63 syncer::StringOrdinal NullAppSorting::CreateFirstAppLaunchOrdinal(
64 const syncer::StringOrdinal& page_ordinal) const {
65 return syncer::StringOrdinal(kFirstApp);
68 syncer::StringOrdinal NullAppSorting::CreateNextAppLaunchOrdinal(
69 const syncer::StringOrdinal& page_ordinal) const {
70 return syncer::StringOrdinal(kNextApp);
73 syncer::StringOrdinal NullAppSorting::CreateFirstAppPageOrdinal() const {
74 return syncer::StringOrdinal(kFirstPage);
77 syncer::StringOrdinal NullAppSorting::GetNaturalAppPageOrdinal() const {
78 return syncer::StringOrdinal(kFirstPage);
81 syncer::StringOrdinal NullAppSorting::GetPageOrdinal(
82 const std::string& extension_id) const {
83 return syncer::StringOrdinal(kFirstPage);
86 void NullAppSorting::SetPageOrdinal(
87 const std::string& extension_id,
88 const syncer::StringOrdinal& new_page_ordinal) {
91 void NullAppSorting::ClearOrdinals(const std::string& extension_id) {
94 int NullAppSorting::PageStringOrdinalAsInteger(
95 const syncer::StringOrdinal& page_ordinal) const {
96 return 0;
99 syncer::StringOrdinal NullAppSorting::PageIntegerAsStringOrdinal(
100 size_t page_index) {
101 return syncer::StringOrdinal(kFirstPage);
104 void NullAppSorting::SetExtensionVisible(const std::string& extension_id,
105 bool visible) {
108 } // namespace extensions