summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 01:54:52 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 01:54:52 +0000
commit285a0674eadfe577c5f23484ac024b2371b9eac5 (patch)
tree6b3503acf562bcf11eb12489ce8a5bd6be7478d4 /chrome/browser/profile.cc
parent0c1195cdd9b3da27748776d109b25bfd71a22ffc (diff)
downloadchromium_src-285a0674eadfe577c5f23484ac024b2371b9eac5.zip
chromium_src-285a0674eadfe577c5f23484ac024b2371b9eac5.tar.gz
chromium_src-285a0674eadfe577c5f23484ac024b2371b9eac5.tar.bz2
NTP/Apps: Change the order of the default apps.
Use a list of pairs instead of using a map so that the insertioj order is kept. BUG=3995 TEST=Start chrome with --enable-apps. The Gmail app should come up first in the list. Review URL: http://codereview.chromium.org/2754008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 31d794c..6a2e9b7 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -779,29 +779,35 @@ void ProfileImpl::InitExtensions() {
true);
// Register the component extensions.
- std::map<std::string, int> component_extensions;
+ typedef std::list<std::pair<std::string, int> > ComponentExtensionList;
+ ComponentExtensionList component_extensions;
// Bookmark manager.
- component_extensions["bookmark_manager"] = IDR_BOOKMARKS_MANIFEST;
+ component_extensions.push_back(
+ std::make_pair("bookmark_manager", IDR_BOOKMARKS_MANIFEST));
#if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
// Chat manager.
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableChatManager)) {
- component_extensions["chat_manager"] = IDR_CHAT_MANAGER_MANIFEST;
+ component_extensions.push_back(
+ std::make_pair("chat_manager", IDR_CHAT_MANAGER_MANIFEST));
}
#endif
// Some sample apps to make our lives easier while we are developing extension
// apps. This way we don't have to constantly install these over and over.
if (Extension::AppsAreEnabled() && IncludeDefaultApps()) {
- component_extensions["gmail_app"] = IDR_GMAIL_APP_MANIFEST;
- component_extensions["calendar_app"] = IDR_CALENDAR_APP_MANIFEST;
- component_extensions["docs_app"] = IDR_DOCS_APP_MANIFEST;
+ component_extensions.push_back(
+ std::make_pair("gmail_app", IDR_GMAIL_APP_MANIFEST));
+ component_extensions.push_back(
+ std::make_pair("calendar_app", IDR_CALENDAR_APP_MANIFEST));
+ component_extensions.push_back(
+ std::make_pair("docs_app", IDR_DOCS_APP_MANIFEST));
}
- for (std::map<std::string, int>::iterator iter = component_extensions.begin();
- iter != component_extensions.end(); ++iter) {
+ for (ComponentExtensionList::iterator iter = component_extensions.begin();
+ iter != component_extensions.end(); ++iter) {
FilePath path;
if (PathService::Get(chrome::DIR_RESOURCES, &path)) {
path = path.AppendASCII(iter->first);