Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/api/webstore_private/webstore_private_api.h" | 5 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 562 // Show the app list to show download is progressing. Don't show the app | 562 // Show the app list to show download is progressing. Don't show the app |
| 563 // list on first app install so users can be trained to open it themselves. | 563 // list on first app install so users can be trained to open it themselves. |
| 564 if (approval_->enable_launcher) | 564 if (approval_->enable_launcher) |
| 565 app_list_service->CreateForProfile(GetProfile()); | 565 app_list_service->CreateForProfile(GetProfile()); |
| 566 else | 566 else |
| 567 app_list_service->AutoShowForProfile(GetProfile()); | 567 app_list_service->AutoShowForProfile(GetProfile()); |
| 568 } | 568 } |
| 569 | 569 |
| 570 // The extension will install through the normal extension install flow, but | 570 // The extension will install through the normal extension install flow, but |
| 571 // the whitelist entry will bypass the normal permissions install dialog. | 571 // the whitelist entry will bypass the normal permissions install dialog. |
| 572 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( | 572 scoped_refptr<WebstoreInstaller> installer = |
| 573 GetProfile(), | 573 new WebstoreInstaller(GetProfile(), |
| 574 this, | 574 this, |
| 575 &(dispatcher()->delegate()->GetAssociatedWebContents()->GetController()), | 575 GetAssociatedWebContents(), |
|
tmdiep
2014/02/11 23:27:34
Thanks for investigating this issue and submitting
| |
| 576 params->expected_id, | 576 params->expected_id, |
| 577 approval_.Pass(), | 577 approval_.Pass(), |
| 578 WebstoreInstaller::INSTALL_SOURCE_OTHER); | 578 WebstoreInstaller::INSTALL_SOURCE_OTHER); |
| 579 installer->Start(); | 579 installer->Start(); |
| 580 | 580 |
| 581 return true; | 581 return true; |
| 582 } | 582 } |
| 583 | 583 |
| 584 void WebstorePrivateCompleteInstallFunction::OnExtensionInstallSuccess( | 584 void WebstorePrivateCompleteInstallFunction::OnExtensionInstallSuccess( |
| 585 const std::string& id) { | 585 const std::string& id) { |
| 586 if (test_webstore_installer_delegate) | 586 if (test_webstore_installer_delegate) |
| 587 test_webstore_installer_delegate->OnExtensionInstallSuccess(id); | 587 test_webstore_installer_delegate->OnExtensionInstallSuccess(id); |
| 588 | 588 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 680 return true; | 680 return true; |
| 681 } | 681 } |
| 682 | 682 |
| 683 bool WebstorePrivateIsInIncognitoModeFunction::RunImpl() { | 683 bool WebstorePrivateIsInIncognitoModeFunction::RunImpl() { |
| 684 results_ = IsInIncognitoMode::Results::Create( | 684 results_ = IsInIncognitoMode::Results::Create( |
| 685 GetProfile() != GetProfile()->GetOriginalProfile()); | 685 GetProfile() != GetProfile()->GetOriginalProfile()); |
| 686 return true; | 686 return true; |
| 687 } | 687 } |
| 688 | 688 |
| 689 } // namespace extensions | 689 } // namespace extensions |
| OLD | NEW |