Check that the user is signed in and the app has oauth2 section before recording an aouth2 grant.
Review URL: https://chromiumcodereview.appspot.com/11066125
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161643 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 15c9535..e04296a 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2084,11 +2084,8 @@
// Silently grant all active permissions to default apps only on install.
// After install they should behave like other apps.
- if (is_default_app_install) {
- // Not recording any OAuth2 grants since no default apps need them. See
- // http://crbug.com/154896 for a better way of checking this.
- GrantPermissions(extension, false);
- }
+ if (is_default_app_install)
+ GrantPermissions(extension, true);
if (is_extension_upgrade) {
// Other than for unpacked extensions, CrxInstaller should have guaranteed