| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/chrome_app_sorting.h" | 5 #include "chrome/browser/extensions/chrome_app_sorting.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const char kPrefPageIndexDeprecated[] = "page_index"; | 40 const char kPrefPageIndexDeprecated[] = "page_index"; |
| 41 const char kPrefPageOrdinal[] = "page_ordinal"; | 41 const char kPrefPageOrdinal[] = "page_ordinal"; |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 //////////////////////////////////////////////////////////////////////////////// | 45 //////////////////////////////////////////////////////////////////////////////// |
| 46 // ChromeAppSorting::AppOrdinals | 46 // ChromeAppSorting::AppOrdinals |
| 47 | 47 |
| 48 ChromeAppSorting::AppOrdinals::AppOrdinals() {} | 48 ChromeAppSorting::AppOrdinals::AppOrdinals() {} |
| 49 | 49 |
| 50 ChromeAppSorting::AppOrdinals::AppOrdinals(const AppOrdinals& other) = default; |
| 51 |
| 50 ChromeAppSorting::AppOrdinals::~AppOrdinals() {} | 52 ChromeAppSorting::AppOrdinals::~AppOrdinals() {} |
| 51 | 53 |
| 52 //////////////////////////////////////////////////////////////////////////////// | 54 //////////////////////////////////////////////////////////////////////////////// |
| 53 // ChromeAppSorting | 55 // ChromeAppSorting |
| 54 | 56 |
| 55 ChromeAppSorting::ChromeAppSorting(content::BrowserContext* browser_context) | 57 ChromeAppSorting::ChromeAppSorting(content::BrowserContext* browser_context) |
| 56 : browser_context_(browser_context), | 58 : browser_context_(browser_context), |
| 57 default_ordinals_created_(false) { | 59 default_ordinals_created_(false) { |
| 58 ExtensionIdList extensions; | 60 ExtensionIdList extensions; |
| 59 ExtensionPrefs::Get(browser_context_)->GetExtensions(&extensions); | 61 ExtensionPrefs::Get(browser_context_)->GetExtensions(&extensions); |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 for (AppLaunchOrdinalMap::const_iterator it = m.begin(); it != m.end(); | 618 for (AppLaunchOrdinalMap::const_iterator it = m.begin(); it != m.end(); |
| 617 ++it) { | 619 ++it) { |
| 618 const std::string& id = it->second; | 620 const std::string& id = it->second; |
| 619 if (ntp_hidden_extensions_.count(id) == 0) | 621 if (ntp_hidden_extensions_.count(id) == 0) |
| 620 result++; | 622 result++; |
| 621 } | 623 } |
| 622 return result; | 624 return result; |
| 623 } | 625 } |
| 624 | 626 |
| 625 } // namespace extensions | 627 } // namespace extensions |
| OLD | NEW |