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

Side by Side Diff: chrome/browser/extensions/extension_navigation_observer.cc

Issue 10630021: Modify experimental identity flow to display scope descriptions and details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync 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(extension); 99 extension_service->GrantPermissionsAndEnableExtension(
100 extension, extension_install_prompt_->record_oauth2_grant());
100 nav_controller->Reload(true); 101 nav_controller->Reload(true);
101 } 102 }
102 103
103 void ExtensionNavigationObserver::InstallUIAbort(bool user_initiated) { 104 void ExtensionNavigationObserver::InstallUIAbort(bool user_initiated) {
104 ExtensionService* extension_service = profile_->GetExtensionService(); 105 ExtensionService* extension_service = profile_->GetExtensionService();
105 const extensions::Extension* extension = extension_service->GetExtensionById( 106 const extensions::Extension* extension = extension_service->GetExtensionById(
106 in_progress_prompt_extension_id_, true); 107 in_progress_prompt_extension_id_, true);
107 108
108 in_progress_prompt_extension_id_ = ""; 109 in_progress_prompt_extension_id_ = "";
109 in_progress_prompt_navigation_controller_ = NULL; 110 in_progress_prompt_navigation_controller_ = NULL;
110 extension_install_prompt_.reset(); 111 extension_install_prompt_.reset();
111 112
112 std::string histogram_name = user_initiated ? 113 std::string histogram_name = user_initiated ?
113 "Extensions.Permissions_ReEnableCancel" : 114 "Extensions.Permissions_ReEnableCancel" :
114 "Extensions.Permissions_ReEnableAbort"; 115 "Extensions.Permissions_ReEnableAbort";
115 ExtensionService::RecordPermissionMessagesHistogram( 116 ExtensionService::RecordPermissionMessagesHistogram(
116 extension, histogram_name.c_str()); 117 extension, histogram_name.c_str());
117 } 118 }
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