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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc

Issue 22730003: Warm-up the App List when enabled from the webstore and not shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698