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

Side by Side Diff: chrome/browser/extensions/chrome_app_sorting.cc

Issue 635573005: Cleanup: Better constify some strings in chrome/browser/{chromeos,extensions}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, nit Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 void ChromeAppSorting::CreateDefaultOrdinals() { 542 void ChromeAppSorting::CreateDefaultOrdinals() {
543 if (default_ordinals_created_) 543 if (default_ordinals_created_)
544 return; 544 return;
545 default_ordinals_created_ = true; 545 default_ordinals_created_ = true;
546 546
547 // The following defines the default order of apps. 547 // The following defines the default order of apps.
548 #if defined(OS_CHROMEOS) 548 #if defined(OS_CHROMEOS)
549 std::vector<std::string> app_ids; 549 std::vector<std::string> app_ids;
550 chromeos::default_app_order::Get(&app_ids); 550 chromeos::default_app_order::Get(&app_ids);
551 #else 551 #else
552 const char* kDefaultAppOrder[] = { 552 const char* const kDefaultAppOrder[] = {
553 extension_misc::kChromeAppId, 553 extension_misc::kChromeAppId,
554 extensions::kWebStoreAppId, 554 extensions::kWebStoreAppId,
555 }; 555 };
556 const std::vector<const char*> app_ids( 556 const std::vector<const char*> app_ids(
557 kDefaultAppOrder, kDefaultAppOrder + arraysize(kDefaultAppOrder)); 557 kDefaultAppOrder, kDefaultAppOrder + arraysize(kDefaultAppOrder));
558 #endif 558 #endif
559 559
560 syncer::StringOrdinal page_ordinal = CreateFirstAppPageOrdinal(); 560 syncer::StringOrdinal page_ordinal = CreateFirstAppPageOrdinal();
561 syncer::StringOrdinal app_launch_ordinal = 561 syncer::StringOrdinal app_launch_ordinal =
562 CreateFirstAppLaunchOrdinal(page_ordinal); 562 CreateFirstAppLaunchOrdinal(page_ordinal);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 for (AppLaunchOrdinalMap::const_iterator it = m.begin(); it != m.end(); 619 for (AppLaunchOrdinalMap::const_iterator it = m.begin(); it != m.end();
620 ++it) { 620 ++it) {
621 const std::string& id = it->second; 621 const std::string& id = it->second;
622 if (ntp_hidden_extensions_.count(id) == 0) 622 if (ntp_hidden_extensions_.count(id) == 0)
623 result++; 623 result++;
624 } 624 }
625 return result; 625 return result;
626 } 626 }
627 627
628 } // namespace extensions 628 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698