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 "apps/app_launcher.h" | 7 #include "apps/app_launcher.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 kNoPreviousBeginInstallWithManifestError, id); | 564 kNoPreviousBeginInstallWithManifestError, id); |
565 return false; | 565 return false; |
566 } | 566 } |
567 | 567 |
568 // Balanced in OnExtensionInstallSuccess() or OnExtensionInstallFailure(). | 568 // Balanced in OnExtensionInstallSuccess() or OnExtensionInstallFailure(). |
569 AddRef(); | 569 AddRef(); |
570 | 570 |
571 if (approval_->enable_launcher) | 571 if (approval_->enable_launcher) |
572 AppListService::Get()->EnableAppList(profile()); | 572 AppListService::Get()->EnableAppList(profile()); |
573 | 573 |
574 if (apps::IsAppLauncherEnabled()) { | 574 if (apps::IsAppLauncherEnabled() && approval_->manifest->is_app()) { |
575 // Show the app list to show download is progressing. Don't show the app | 575 // Show the app list to show download is progressing. Don't show the app |
576 // list on first app install so users can be trained to open it themselves. | 576 // list on first app install so users can be trained to open it themselves. |
577 if (approval_->manifest->is_app() && !approval_->enable_launcher) | 577 if (approval_->enable_launcher) |
| 578 AppListService::Get()->CreateForProfile(profile()); |
| 579 else |
578 AppListService::Get()->ShowForProfile(profile()); | 580 AppListService::Get()->ShowForProfile(profile()); |
579 } | 581 } |
580 | 582 |
581 // The extension will install through the normal extension install flow, but | 583 // The extension will install through the normal extension install flow, but |
582 // the whitelist entry will bypass the normal permissions install dialog. | 584 // the whitelist entry will bypass the normal permissions install dialog. |
583 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( | 585 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( |
584 profile(), this, | 586 profile(), this, |
585 &(dispatcher()->delegate()->GetAssociatedWebContents()->GetController()), | 587 &(dispatcher()->delegate()->GetAssociatedWebContents()->GetController()), |
586 id, approval_.Pass(), WebstoreInstaller::FLAG_NONE); | 588 id, approval_.Pass(), WebstoreInstaller::FLAG_NONE); |
587 installer->Start(); | 589 installer->Start(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 } | 684 } |
683 | 685 |
684 bool WebstorePrivateIsInIncognitoModeFunction::RunImpl() { | 686 bool WebstorePrivateIsInIncognitoModeFunction::RunImpl() { |
685 SetResult( | 687 SetResult( |
686 Value::CreateBooleanValue(profile_ != profile_->GetOriginalProfile())); | 688 Value::CreateBooleanValue(profile_ != profile_->GetOriginalProfile())); |
687 SendResponse(true); | 689 SendResponse(true); |
688 return true; | 690 return true; |
689 } | 691 } |
690 | 692 |
691 } // namespace extensions | 693 } // namespace extensions |
OLD | NEW |