Defending from failing APIs.

Some chrome.* API calls may legitimately fail.
Also, chrome.runtime.onInstalled/onStartup callbacks may not happen due to implementation bugs.

We need to rewrite the extension to degrade as little as possible in such cases. In practice, this only means initializing values retrieved from chrome.storage. Since we initialize them upon retrieval, there is no need to initialize them from installed/startup callbacks, so I'm removing them from there.
The only remaining initialization if for activeNotifications; it will be take care of when I start using notifications.getAll API call.

BUG=164227
TEST=Existing tests should work

Review URL: https://chromiumcodereview.appspot.com/15495008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201921 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed