| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/shell/browser/shell_app_sorting.h" | 5 #include "extensions/browser/null_app_sorting.h" |
| 6 | 6 |
| 7 #include "sync/api/string_ordinal.h" | 7 #include "sync/api/string_ordinal.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 // Ordinals for a single app on a single page. | 11 // Ordinals for a single app on a single page. |
| 12 const char kFirstApp[] = "a"; | 12 const char kFirstApp[] = "a"; |
| 13 const char kNextApp[] = "b"; | 13 const char kNextApp[] = "b"; |
| 14 const char kFirstPage[] = "a"; | 14 const char kFirstPage[] = "a"; |
| 15 | 15 |
| 16 } // namespace | 16 } // namespace |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 ShellAppSorting::ShellAppSorting() { | 20 NullAppSorting::NullAppSorting() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 ShellAppSorting::~ShellAppSorting() { | 23 NullAppSorting::~NullAppSorting() { |
| 24 } | 24 } |
| 25 | 25 |
| 26 void ShellAppSorting::SetExtensionScopedPrefs(ExtensionScopedPrefs* prefs) { | 26 void NullAppSorting::SetExtensionScopedPrefs(ExtensionScopedPrefs* prefs) { |
| 27 } | 27 } |
| 28 | 28 |
| 29 void ShellAppSorting::SetExtensionSyncService( | 29 void NullAppSorting::SetExtensionSyncService( |
| 30 ExtensionSyncService* extension_sync_service) { | 30 ExtensionSyncService* extension_sync_service) { |
| 31 } | 31 } |
| 32 | 32 |
| 33 void ShellAppSorting::Initialize(const ExtensionIdList& extension_ids) { | 33 void NullAppSorting::Initialize(const ExtensionIdList& extension_ids) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 void ShellAppSorting::FixNTPOrdinalCollisions() { | 36 void NullAppSorting::FixNTPOrdinalCollisions() { |
| 37 } | 37 } |
| 38 | 38 |
| 39 void ShellAppSorting::EnsureValidOrdinals( | 39 void NullAppSorting::EnsureValidOrdinals( |
| 40 const std::string& extension_id, | 40 const std::string& extension_id, |
| 41 const syncer::StringOrdinal& suggested_page) { | 41 const syncer::StringOrdinal& suggested_page) { |
| 42 } | 42 } |
| 43 | 43 |
| 44 void ShellAppSorting::OnExtensionMoved( | 44 void NullAppSorting::OnExtensionMoved( |
| 45 const std::string& moved_extension_id, | 45 const std::string& moved_extension_id, |
| 46 const std::string& predecessor_extension_id, | 46 const std::string& predecessor_extension_id, |
| 47 const std::string& successor_extension_id) { | 47 const std::string& successor_extension_id) { |
| 48 } | 48 } |
| 49 | 49 |
| 50 syncer::StringOrdinal ShellAppSorting::GetAppLaunchOrdinal( | 50 syncer::StringOrdinal NullAppSorting::GetAppLaunchOrdinal( |
| 51 const std::string& extension_id) const { | 51 const std::string& extension_id) const { |
| 52 return syncer::StringOrdinal(kFirstApp); | 52 return syncer::StringOrdinal(kFirstApp); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void ShellAppSorting::SetAppLaunchOrdinal( | 55 void NullAppSorting::SetAppLaunchOrdinal( |
| 56 const std::string& extension_id, | 56 const std::string& extension_id, |
| 57 const syncer::StringOrdinal& new_app_launch_ordinal) { | 57 const syncer::StringOrdinal& new_app_launch_ordinal) { |
| 58 } | 58 } |
| 59 | 59 |
| 60 syncer::StringOrdinal ShellAppSorting::CreateFirstAppLaunchOrdinal( | 60 syncer::StringOrdinal NullAppSorting::CreateFirstAppLaunchOrdinal( |
| 61 const syncer::StringOrdinal& page_ordinal) const { | 61 const syncer::StringOrdinal& page_ordinal) const { |
| 62 return syncer::StringOrdinal(kFirstApp); | 62 return syncer::StringOrdinal(kFirstApp); |
| 63 } | 63 } |
| 64 | 64 |
| 65 syncer::StringOrdinal ShellAppSorting::CreateNextAppLaunchOrdinal( | 65 syncer::StringOrdinal NullAppSorting::CreateNextAppLaunchOrdinal( |
| 66 const syncer::StringOrdinal& page_ordinal) const { | 66 const syncer::StringOrdinal& page_ordinal) const { |
| 67 return syncer::StringOrdinal(kNextApp); | 67 return syncer::StringOrdinal(kNextApp); |
| 68 } | 68 } |
| 69 | 69 |
| 70 syncer::StringOrdinal ShellAppSorting::CreateFirstAppPageOrdinal() const { | 70 syncer::StringOrdinal NullAppSorting::CreateFirstAppPageOrdinal() const { |
| 71 return syncer::StringOrdinal(kFirstPage); | 71 return syncer::StringOrdinal(kFirstPage); |
| 72 } | 72 } |
| 73 | 73 |
| 74 syncer::StringOrdinal ShellAppSorting::GetNaturalAppPageOrdinal() const { | 74 syncer::StringOrdinal NullAppSorting::GetNaturalAppPageOrdinal() const { |
| 75 return syncer::StringOrdinal(kFirstPage); | 75 return syncer::StringOrdinal(kFirstPage); |
| 76 } | 76 } |
| 77 | 77 |
| 78 syncer::StringOrdinal ShellAppSorting::GetPageOrdinal( | 78 syncer::StringOrdinal NullAppSorting::GetPageOrdinal( |
| 79 const std::string& extension_id) const { | 79 const std::string& extension_id) const { |
| 80 return syncer::StringOrdinal(kFirstPage); | 80 return syncer::StringOrdinal(kFirstPage); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void ShellAppSorting::SetPageOrdinal( | 83 void NullAppSorting::SetPageOrdinal( |
| 84 const std::string& extension_id, | 84 const std::string& extension_id, |
| 85 const syncer::StringOrdinal& new_page_ordinal) { | 85 const syncer::StringOrdinal& new_page_ordinal) { |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ShellAppSorting::ClearOrdinals(const std::string& extension_id) { | 88 void NullAppSorting::ClearOrdinals(const std::string& extension_id) { |
| 89 } | 89 } |
| 90 | 90 |
| 91 int ShellAppSorting::PageStringOrdinalAsInteger( | 91 int NullAppSorting::PageStringOrdinalAsInteger( |
| 92 const syncer::StringOrdinal& page_ordinal) const { | 92 const syncer::StringOrdinal& page_ordinal) const { |
| 93 return 0; | 93 return 0; |
| 94 } | 94 } |
| 95 | 95 |
| 96 syncer::StringOrdinal ShellAppSorting::PageIntegerAsStringOrdinal( | 96 syncer::StringOrdinal NullAppSorting::PageIntegerAsStringOrdinal( |
| 97 size_t page_index) { | 97 size_t page_index) { |
| 98 return syncer::StringOrdinal(kFirstPage); | 98 return syncer::StringOrdinal(kFirstPage); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void ShellAppSorting::SetExtensionVisible(const std::string& extension_id, | 101 void NullAppSorting::SetExtensionVisible(const std::string& extension_id, |
| 102 bool visible) { | 102 bool visible) { |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace extensions | 105 } // namespace extensions |
| OLD | NEW |