Cache the channel information on iOS.
commitf8ddd0453e34fb3d99198c3b115eab607aabf042
authorsdefresne <sdefresne@chromium.org>
Tue, 11 Aug 2015 07:42:35 +0000 (11 00:42 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 11 Aug 2015 07:43:16 +0000 (11 07:43 +0000)
tree2767c036b990c6c5a3d5bb690f60100b1a172140
parent9afcba80a2a3b235cd7937459e4687b258a3a33d
Cache the channel information on iOS.

Quick testing reveals that GetChannel() is called twice for every key
press in the Omnibox. Cache the values since they never change during
the application lifetime.

Use dispatch_once() to ensure proper initialization of the values.

BUG=511912

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

Cr-Commit-Position: refs/heads/master@{#342796}
ios/chrome/common/channel_info.mm