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

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

Issue 10699057: Move application creation and extension install prompt showing off Browser and onto ExtensionTabHel… (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_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 NOTREACHED(); 573 NOTREACHED();
574 574
575 return false; 575 return false;
576 } 576 }
577 577
578 // We want a silent install only for non-pending extensions and 578 // We want a silent install only for non-pending extensions and
579 // pending extensions that have install_silently set. 579 // pending extensions that have install_silently set.
580 Browser* browser = browser::FindLastActiveWithProfile(profile_); 580 Browser* browser = browser::FindLastActiveWithProfile(profile_);
581 ExtensionInstallPrompt* client = 581 ExtensionInstallPrompt* client =
582 (!pending_extension_info || pending_extension_info->install_silently()) ? 582 (!pending_extension_info || pending_extension_info->install_silently()) ?
583 NULL : new ExtensionInstallPrompt(browser); 583 NULL : chrome::CreateExtensionInstallPromptWithBrowser(browser);
584 584
585 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, client)); 585 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create(this, client));
586 installer->set_expected_id(id); 586 installer->set_expected_id(id);
587 if (pending_extension_info) { 587 if (pending_extension_info) {
588 installer->set_install_source(pending_extension_info->install_source()); 588 installer->set_install_source(pending_extension_info->install_source());
589 if (pending_extension_info->install_silently()) 589 if (pending_extension_info->install_silently())
590 installer->set_allow_silent_install(true); 590 installer->set_allow_silent_install(true);
591 } else if (extension) { 591 } else if (extension) {
592 installer->set_install_source(extension->location()); 592 installer->set_install_source(extension->location());
593 } 593 }
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 2560
2561 // To coexist with certain unit tests that don't have a work-thread message 2561 // To coexist with certain unit tests that don't have a work-thread message
2562 // loop available at ExtensionService shutdown, we lazy-initialize this 2562 // loop available at ExtensionService shutdown, we lazy-initialize this
2563 // object so that those cases neither create nor destroy an 2563 // object so that those cases neither create nor destroy an
2564 // APIResourceController. 2564 // APIResourceController.
2565 if (!api_resource_controller_.get()) { 2565 if (!api_resource_controller_.get()) {
2566 api_resource_controller_.reset(new extensions::APIResourceController()); 2566 api_resource_controller_.reset(new extensions::APIResourceController());
2567 } 2567 }
2568 return api_resource_controller_.get(); 2568 return api_resource_controller_.get();
2569 } 2569 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_navigation_observer.cc ('k') | chrome/browser/extensions/extension_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698