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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } | 325 } |
326 | 326 |
327 void WebstorePrivateBeginInstallWithManifest3Function::HandleInstallProceed() { | 327 void WebstorePrivateBeginInstallWithManifest3Function::HandleInstallProceed() { |
328 // This gets cleared in CrxInstaller::ConfirmInstall(). TODO(asargent) - in | 328 // This gets cleared in CrxInstaller::ConfirmInstall(). TODO(asargent) - in |
329 // the future we may also want to add time-based expiration, where a whitelist | 329 // the future we may also want to add time-based expiration, where a whitelist |
330 // entry is only valid for some number of minutes. | 330 // entry is only valid for some number of minutes. |
331 scoped_ptr<WebstoreInstaller::Approval> approval( | 331 scoped_ptr<WebstoreInstaller::Approval> approval( |
332 WebstoreInstaller::Approval::CreateWithNoInstallPrompt( | 332 WebstoreInstaller::Approval::CreateWithNoInstallPrompt( |
333 chrome_details_.GetProfile(), details().id, | 333 chrome_details_.GetProfile(), details().id, |
334 std::move(parsed_manifest_), false)); | 334 std::move(parsed_manifest_), false)); |
335 approval->use_app_installed_bubble = details().app_install_bubble; | 335 approval->use_app_installed_bubble = !!details().app_install_bubble; |
336 approval->enable_launcher = details().enable_launcher; | 336 approval->enable_launcher = !!details().enable_launcher; |
337 // If we are enabling the launcher, we should not show the app list in order | 337 // If we are enabling the launcher, we should not show the app list in order |
338 // to train the user to open it themselves at least once. | 338 // to train the user to open it themselves at least once. |
339 approval->skip_post_install_ui = details().enable_launcher; | 339 approval->skip_post_install_ui = !!details().enable_launcher; |
340 approval->dummy_extension = dummy_extension_.get(); | 340 approval->dummy_extension = dummy_extension_.get(); |
341 approval->installing_icon = gfx::ImageSkia::CreateFrom1xBitmap(icon_); | 341 approval->installing_icon = gfx::ImageSkia::CreateFrom1xBitmap(icon_); |
342 if (details().authuser) | 342 if (details().authuser) |
343 approval->authuser = *details().authuser; | 343 approval->authuser = *details().authuser; |
344 g_pending_approvals.Get().PushApproval(std::move(approval)); | 344 g_pending_approvals.Get().PushApproval(std::move(approval)); |
345 | 345 |
346 DCHECK(scoped_active_install_.get()); | 346 DCHECK(scoped_active_install_.get()); |
347 scoped_active_install_->CancelDeregister(); | 347 scoped_active_install_->CancelDeregister(); |
348 | 348 |
349 // The Permissions_Install histogram is recorded from the ExtensionService | 349 // The Permissions_Install histogram is recorded from the ExtensionService |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 WebstorePrivateGetEphemeralAppsEnabledFunction:: | 708 WebstorePrivateGetEphemeralAppsEnabledFunction:: |
709 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} | 709 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} |
710 | 710 |
711 ExtensionFunction::ResponseAction | 711 ExtensionFunction::ResponseAction |
712 WebstorePrivateGetEphemeralAppsEnabledFunction::Run() { | 712 WebstorePrivateGetEphemeralAppsEnabledFunction::Run() { |
713 return RespondNow(ArgumentList(GetEphemeralAppsEnabled::Results::Create( | 713 return RespondNow(ArgumentList(GetEphemeralAppsEnabled::Results::Create( |
714 false))); | 714 false))); |
715 } | 715 } |
716 | 716 |
717 } // namespace extensions | 717 } // namespace extensions |
OLD | NEW |