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

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

Issue 18421007: [win] Set the profile path when enabling the app launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
« 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 if (!approval_) { 553 if (!approval_) {
554 error_ = ErrorUtils::FormatErrorMessage( 554 error_ = ErrorUtils::FormatErrorMessage(
555 kNoPreviousBeginInstallWithManifestError, id); 555 kNoPreviousBeginInstallWithManifestError, id);
556 return false; 556 return false;
557 } 557 }
558 558
559 // Balanced in OnExtensionInstallSuccess() or OnExtensionInstallFailure(). 559 // Balanced in OnExtensionInstallSuccess() or OnExtensionInstallFailure().
560 AddRef(); 560 AddRef();
561 561
562 if (approval_->enable_launcher) 562 if (approval_->enable_launcher)
563 AppListService::Get()->EnableAppList(); 563 AppListService::Get()->EnableAppList(profile());
564 564
565 if (apps::IsAppLauncherEnabled()) { 565 if (apps::IsAppLauncherEnabled()) {
566 // Show the app list to show download is progressing. Don't show the app 566 // Show the app list to show download is progressing. Don't show the app
567 // list on first app install so users can be trained to open it themselves. 567 // list on first app install so users can be trained to open it themselves.
568 if (approval_->manifest->is_app() && !approval_->enable_launcher) 568 if (approval_->manifest->is_app() && !approval_->enable_launcher)
569 AppListService::Get()->ShowAppList(profile()); 569 AppListService::Get()->ShowAppList(profile());
570 } 570 }
571 571
572 // The extension will install through the normal extension install flow, but 572 // The extension will install through the normal extension install flow, but
573 // the whitelist entry will bypass the normal permissions install dialog. 573 // the whitelist entry will bypass the normal permissions install dialog.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 // Matches the AddRef in RunImpl(). 610 // Matches the AddRef in RunImpl().
611 Release(); 611 Release();
612 } 612 }
613 613
614 EnableAppLauncherFunction::EnableAppLauncherFunction() {} 614 EnableAppLauncherFunction::EnableAppLauncherFunction() {}
615 615
616 EnableAppLauncherFunction::~EnableAppLauncherFunction() {} 616 EnableAppLauncherFunction::~EnableAppLauncherFunction() {}
617 617
618 bool EnableAppLauncherFunction::RunImpl() { 618 bool EnableAppLauncherFunction::RunImpl() {
619 AppListService::Get()->EnableAppList(); 619 AppListService::Get()->EnableAppList(profile());
620 SendResponse(true); 620 SendResponse(true);
621 return true; 621 return true;
622 } 622 }
623 623
624 bool GetBrowserLoginFunction::RunImpl() { 624 bool GetBrowserLoginFunction::RunImpl() {
625 SetResult(CreateLoginResult(profile_->GetOriginalProfile())); 625 SetResult(CreateLoginResult(profile_->GetOriginalProfile()));
626 return true; 626 return true;
627 } 627 }
628 628
629 bool GetStoreLoginFunction::RunImpl() { 629 bool GetStoreLoginFunction::RunImpl() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 669 }
670 670
671 bool IsInIncognitoModeFunction::RunImpl() { 671 bool IsInIncognitoModeFunction::RunImpl() {
672 SetResult( 672 SetResult(
673 Value::CreateBooleanValue(profile_ != profile_->GetOriginalProfile())); 673 Value::CreateBooleanValue(profile_ != profile_->GetOriginalProfile()));
674 SendResponse(true); 674 SendResponse(true);
675 return true; 675 return true;
676 } 676 }
677 677
678 } // namespace extensions 678 } // 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