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

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

Issue 15987009: Update chrome/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/external_install_ui.h" 5 #include "chrome/browser/extensions/external_install_ui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (!extension) 164 if (!extension)
165 return; 165 return;
166 GlobalErrorService* error_service = 166 GlobalErrorService* error_service =
167 GlobalErrorServiceFactory::GetForProfile(service->profile()); 167 GlobalErrorServiceFactory::GetForProfile(service->profile());
168 if (error_service->GetGlobalErrorByMenuItemCommandID(kMenuCommandId)) 168 if (error_service->GetGlobalErrorByMenuItemCommandID(kMenuCommandId))
169 return; 169 return;
170 170
171 ExternalInstallDialogDelegate* delegate = 171 ExternalInstallDialogDelegate* delegate =
172 static_cast<ExternalInstallDialogDelegate*>(prompt_delegate); 172 static_cast<ExternalInstallDialogDelegate*>(prompt_delegate);
173 ExternalInstallGlobalError* error_bubble = new ExternalInstallGlobalError( 173 ExternalInstallGlobalError* error_bubble = new ExternalInstallGlobalError(
174 service, extension, delegate, prompt); 174 service.get(), extension, delegate, prompt);
175 error_service->AddGlobalError(error_bubble); 175 error_service->AddGlobalError(error_bubble);
176 // Show bubble immediately if possible. 176 // Show bubble immediately if possible.
177 if (delegate->browser()) 177 if (delegate->browser())
178 error_bubble->ShowBubbleView(delegate->browser()); 178 error_bubble->ShowBubbleView(delegate->browser());
179 } 179 }
180 180
181 static void ShowExternalInstallDialog( 181 static void ShowExternalInstallDialog(
182 ExtensionService* service, 182 ExtensionService* service,
183 Browser* browser, 183 Browser* browser,
184 const Extension* extension) { 184 const Extension* extension) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 444
445 bool HasExternalInstallBubble(ExtensionService* service) { 445 bool HasExternalInstallBubble(ExtensionService* service) {
446 GlobalErrorService* error_service = 446 GlobalErrorService* error_service =
447 GlobalErrorServiceFactory::GetForProfile(service->profile()); 447 GlobalErrorServiceFactory::GetForProfile(service->profile());
448 GlobalError* error = error_service->GetGlobalErrorByMenuItemCommandID( 448 GlobalError* error = error_service->GetGlobalErrorByMenuItemCommandID(
449 kMenuCommandId); 449 kMenuCommandId);
450 return error && error->HasBubbleView(); 450 return error && error->HasBubbleView();
451 } 451 }
452 452
453 } // namespace extensions 453 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/script_executor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698