| 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/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 approval->authuser = *params().details.authuser; | 420 approval->authuser = *params().details.authuser; |
| 421 g_pending_approvals.Get().PushApproval(approval.Pass()); | 421 g_pending_approvals.Get().PushApproval(approval.Pass()); |
| 422 | 422 |
| 423 DCHECK(scoped_active_install_.get()); | 423 DCHECK(scoped_active_install_.get()); |
| 424 scoped_active_install_->CancelDeregister(); | 424 scoped_active_install_->CancelDeregister(); |
| 425 | 425 |
| 426 // The Permissions_Install histogram is recorded from the ExtensionService | 426 // The Permissions_Install histogram is recorded from the ExtensionService |
| 427 // for all extension installs, so we only need to record the web store | 427 // for all extension installs, so we only need to record the web store |
| 428 // specific histogram here. | 428 // specific histogram here. |
| 429 ExtensionService::RecordPermissionMessagesHistogram( | 429 ExtensionService::RecordPermissionMessagesHistogram( |
| 430 dummy_extension().get(), "Extensions.Permissions_WebStoreInstall2"); | 430 dummy_extension().get(), "WebStoreInstall"); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void WebstorePrivateBeginInstallWithManifest3Function::InstallUIAbortHook( | 433 void WebstorePrivateBeginInstallWithManifest3Function::InstallUIAbortHook( |
| 434 bool user_initiated) { | 434 bool user_initiated) { |
| 435 // The web store install histograms are a subset of the install histograms. | 435 // The web store install histograms are a subset of the install histograms. |
| 436 // We need to record both histograms here since CrxInstaller::InstallUIAbort | 436 // We need to record both histograms here since CrxInstaller::InstallUIAbort |
| 437 // is never called for web store install cancellations. | 437 // is never called for web store install cancellations. |
| 438 std::string histogram_name = | 438 std::string histogram_name = user_initiated ? "WebStoreInstallCancel" |
| 439 user_initiated ? "Extensions.Permissions_WebStoreInstallCancel2" | 439 : "WebStoreInstallAbort"; |
| 440 : "Extensions.Permissions_WebStoreInstallAbort2"; | |
| 441 ExtensionService::RecordPermissionMessagesHistogram(dummy_extension().get(), | 440 ExtensionService::RecordPermissionMessagesHistogram(dummy_extension().get(), |
| 442 histogram_name.c_str()); | 441 histogram_name.c_str()); |
| 443 | 442 |
| 444 histogram_name = user_initiated ? "Extensions.Permissions_InstallCancel2" | 443 histogram_name = user_initiated ? "InstallCancel" : "InstallAbort"; |
| 445 : "Extensions.Permissions_InstallAbort2"; | |
| 446 ExtensionService::RecordPermissionMessagesHistogram(dummy_extension().get(), | 444 ExtensionService::RecordPermissionMessagesHistogram(dummy_extension().get(), |
| 447 histogram_name.c_str()); | 445 histogram_name.c_str()); |
| 448 } | 446 } |
| 449 | 447 |
| 450 void WebstorePrivateBeginInstallWithManifest3Function::ShowPrompt( | 448 void WebstorePrivateBeginInstallWithManifest3Function::ShowPrompt( |
| 451 ExtensionInstallPrompt* install_prompt) { | 449 ExtensionInstallPrompt* install_prompt) { |
| 452 install_prompt->ConfirmWebstoreInstall( | 450 install_prompt->ConfirmWebstoreInstall( |
| 453 this, dummy_extension().get(), &icon(), | 451 this, dummy_extension().get(), &icon(), |
| 454 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); | 452 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); |
| 455 } | 453 } |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 WebstorePrivateGetEphemeralAppsEnabledFunction:: | 867 WebstorePrivateGetEphemeralAppsEnabledFunction:: |
| 870 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} | 868 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} |
| 871 | 869 |
| 872 ExtensionFunction::ResponseAction | 870 ExtensionFunction::ResponseAction |
| 873 WebstorePrivateGetEphemeralAppsEnabledFunction::Run() { | 871 WebstorePrivateGetEphemeralAppsEnabledFunction::Run() { |
| 874 return RespondNow(ArgumentList(GetEphemeralAppsEnabled::Results::Create( | 872 return RespondNow(ArgumentList(GetEphemeralAppsEnabled::Results::Create( |
| 875 EphemeralAppLauncher::IsFeatureEnabled()))); | 873 EphemeralAppLauncher::IsFeatureEnabled()))); |
| 876 } | 874 } |
| 877 | 875 |
| 878 } // namespace extensions | 876 } // namespace extensions |
| OLD | NEW |