Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / browser / null_app_sorting.cc
blob633bfc7822c558a8a225f0a28f7ce361f1e2a3ee
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::Initialize(const ExtensionIdList& extension_ids) {
35 void NullAppSorting::FixNTPOrdinalCollisions() {
38 void NullAppSorting::EnsureValidOrdinals(
39 const std::string& extension_id,
40 const syncer::StringOrdinal& suggested_page) {
43 void NullAppSorting::OnExtensionMoved(
44 const std::string& moved_extension_id,
45 const std::string& predecessor_extension_id,
46 const std::string& successor_extension_id) {
49 syncer::StringOrdinal NullAppSorting::GetAppLaunchOrdinal(
50 const std::string& extension_id) const {
51 return syncer::StringOrdinal(kFirstApp);
54 void NullAppSorting::SetAppLaunchOrdinal(
55 const std::string& extension_id,
56 const syncer::StringOrdinal& new_app_launch_ordinal) {
59 syncer::StringOrdinal NullAppSorting::CreateFirstAppLaunchOrdinal(
60 const syncer::StringOrdinal& page_ordinal) const {
61 return syncer::StringOrdinal(kFirstApp);
64 syncer::StringOrdinal NullAppSorting::CreateNextAppLaunchOrdinal(
65 const syncer::StringOrdinal& page_ordinal) const {
66 return syncer::StringOrdinal(kNextApp);
69 syncer::StringOrdinal NullAppSorting::CreateFirstAppPageOrdinal() const {
70 return syncer::StringOrdinal(kFirstPage);
73 syncer::StringOrdinal NullAppSorting::GetNaturalAppPageOrdinal() const {
74 return syncer::StringOrdinal(kFirstPage);
77 syncer::StringOrdinal NullAppSorting::GetPageOrdinal(
78 const std::string& extension_id) const {
79 return syncer::StringOrdinal(kFirstPage);
82 void NullAppSorting::SetPageOrdinal(
83 const std::string& extension_id,
84 const syncer::StringOrdinal& new_page_ordinal) {
87 void NullAppSorting::ClearOrdinals(const std::string& extension_id) {
90 int NullAppSorting::PageStringOrdinalAsInteger(
91 const syncer::StringOrdinal& page_ordinal) const {
92 return 0;
95 syncer::StringOrdinal NullAppSorting::PageIntegerAsStringOrdinal(
96 size_t page_index) {
97 return syncer::StringOrdinal(kFirstPage);
100 void NullAppSorting::SetExtensionVisible(const std::string& extension_id,
101 bool visible) {
104 } // namespace extensions