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

Side by Side Diff: chrome/browser/extensions/extension_navigation_observer.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/extensions/extension_navigation_observer.h" 5 #include "chrome/browser/extensions/extension_navigation_observer.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 NavigationController* nav_controller = 89 NavigationController* nav_controller =
90 in_progress_prompt_navigation_controller_; 90 in_progress_prompt_navigation_controller_;
91 CHECK(extension); 91 CHECK(extension);
92 CHECK(nav_controller); 92 CHECK(nav_controller);
93 93
94 in_progress_prompt_extension_id_ = ""; 94 in_progress_prompt_extension_id_ = "";
95 in_progress_prompt_navigation_controller_ = NULL; 95 in_progress_prompt_navigation_controller_ = NULL;
96 extension_install_prompt_.reset(); 96 extension_install_prompt_.reset();
97 97
98 // Grant permissions, re-enable the extension, and then reload the tab. 98 // Grant permissions, re-enable the extension, and then reload the tab.
99 extension_service->GrantPermissionsAndEnableExtension( 99 extension_service->GrantPermissionsAndEnableExtension(extension);
100 extension, extension_install_prompt_->record_oauth2_grant());
101 nav_controller->Reload(true); 100 nav_controller->Reload(true);
102 } 101 }
103 102
104 void ExtensionNavigationObserver::InstallUIAbort(bool user_initiated) { 103 void ExtensionNavigationObserver::InstallUIAbort(bool user_initiated) {
105 ExtensionService* extension_service = profile_->GetExtensionService(); 104 ExtensionService* extension_service = profile_->GetExtensionService();
106 const extensions::Extension* extension = extension_service->GetExtensionById( 105 const extensions::Extension* extension = extension_service->GetExtensionById(
107 in_progress_prompt_extension_id_, true); 106 in_progress_prompt_extension_id_, true);
108 107
109 in_progress_prompt_extension_id_ = ""; 108 in_progress_prompt_extension_id_ = "";
110 in_progress_prompt_navigation_controller_ = NULL; 109 in_progress_prompt_navigation_controller_ = NULL;
111 extension_install_prompt_.reset(); 110 extension_install_prompt_.reset();
112 111
113 std::string histogram_name = user_initiated ? 112 std::string histogram_name = user_initiated ?
114 "Extensions.Permissions_ReEnableCancel" : 113 "Extensions.Permissions_ReEnableCancel" :
115 "Extensions.Permissions_ReEnableAbort"; 114 "Extensions.Permissions_ReEnableAbort";
116 ExtensionService::RecordPermissionMessagesHistogram( 115 ExtensionService::RecordPermissionMessagesHistogram(
117 extension, histogram_name.c_str()); 116 extension, histogram_name.c_str());
118 } 117 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_ui_default.cc ('k') | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698