Cache --whitelisted-extension-id in SimpleFeature.
commit16ca320592ce7ef6cd36500da6e670cc645781cd
authorjackhou <jackhou@chromium.org>
Fri, 10 Apr 2015 03:45:19 +0000 (9 20:45 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Apr 2015 03:45:51 +0000 (10 03:45 +0000)
treeda85924211d0fd95766e24117476638643e0e923
parente46d521900156cf4fa528147f5efa66eacb183a4
Cache --whitelisted-extension-id in SimpleFeature.

During startup, CommandLine::HasSwitch(kWhitelistedExtensionID) is
called ~1000 times by SimpleFeature. It is the most common switch
lookup, the second being kAppsGalleryUpdateUrl at ~300 times.

Caching this avoids allocating and copying the string each time.

BUG=471976

Review URL: https://codereview.chromium.org/1047943002

Cr-Commit-Position: refs/heads/master@{#324583}
chrome/browser/extensions/permission_message_combinations_unittest.cc
chrome/browser/extensions/test_extension_environment.cc
chrome/browser/extensions/test_extension_environment.h
chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
extensions/common/features/simple_feature.cc
extensions/common/features/simple_feature.h