Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 10702017: Revert r 144574 "Modify experimental identity flow to display scope descriptions and details." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 // Do the re-enable work here. 940 // Do the re-enable work here.
941 DCHECK(!extension_id_prompting_.empty()); 941 DCHECK(!extension_id_prompting_.empty());
942 942
943 // The extension can be uninstalled in another window while the UI was 943 // The extension can be uninstalled in another window while the UI was
944 // showing. Do nothing in that case. 944 // showing. Do nothing in that case.
945 const Extension* extension = 945 const Extension* extension =
946 extension_service_->GetExtensionById(extension_id_prompting_, true); 946 extension_service_->GetExtensionById(extension_id_prompting_, true);
947 if (!extension) 947 if (!extension)
948 return; 948 return;
949 949
950 extension_service_->GrantPermissionsAndEnableExtension( 950 extension_service_->GrantPermissionsAndEnableExtension(extension);
951 extension, extension_install_ui_->record_oauth2_grant());
952 951
953 // We bounce this off the NTP so the browser can update the apps icon. 952 // We bounce this off the NTP so the browser can update the apps icon.
954 // If we don't launch the app asynchronously, then the app's disabled 953 // If we don't launch the app asynchronously, then the app's disabled
955 // icon disappears but isn't replaced by the enabled icon, making a poor 954 // icon disappears but isn't replaced by the enabled icon, making a poor
956 // visual experience. 955 // visual experience.
957 StringValue app_id(extension->id()); 956 StringValue app_id(extension->id());
958 web_ui()->CallJavascriptFunction("ntp.launchAppAfterEnable", app_id); 957 web_ui()->CallJavascriptFunction("ntp.launchAppAfterEnable", app_id);
959 958
960 extension_id_prompting_ = ""; 959 extension_id_prompting_ = "";
961 } 960 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 994
996 void AppLauncherHandler::UninstallDefaultApps() { 995 void AppLauncherHandler::UninstallDefaultApps() {
997 AppsPromo* apps_promo = extension_service_->apps_promo(); 996 AppsPromo* apps_promo = extension_service_->apps_promo();
998 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps(); 997 const extensions::ExtensionIdSet& app_ids = apps_promo->old_default_apps();
999 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin(); 998 for (extensions::ExtensionIdSet::const_iterator iter = app_ids.begin();
1000 iter != app_ids.end(); ++iter) { 999 iter != app_ids.end(); ++iter) {
1001 if (extension_service_->GetExtensionById(*iter, true)) 1000 if (extension_service_->GetExtensionById(*iter, true))
1002 extension_service_->UninstallExtension(*iter, false, NULL); 1001 extension_service_->UninstallExtension(*iter, false, NULL);
1003 } 1002 }
1004 } 1003 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698