| 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.h" | 7 #include "base/bind.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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 WebstoreInstaller::Approval* approval = approvals_[i]; | 86 WebstoreInstaller::Approval* approval = approvals_[i]; |
| 87 if (approval->extension_id == id && | 87 if (approval->extension_id == id && |
| 88 profile->IsSameProfile(approval->profile)) { | 88 profile->IsSameProfile(approval->profile)) { |
| 89 approvals_.weak_erase(approvals_.begin() + i); | 89 approvals_.weak_erase(approvals_.begin() + i); |
| 90 return scoped_ptr<WebstoreInstaller::Approval>(approval); | 90 return scoped_ptr<WebstoreInstaller::Approval>(approval); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 return scoped_ptr<WebstoreInstaller::Approval>(); | 93 return scoped_ptr<WebstoreInstaller::Approval>(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 chrome::HostDesktopType GetHostDesktopTypeForWebContents( | 96 ui::HostDesktopType GetHostDesktopTypeForWebContents( |
| 97 content::WebContents* contents) { | 97 content::WebContents* contents) { |
| 98 return chrome::GetHostDesktopTypeForNativeWindow( | 98 return chrome::GetHostDesktopTypeForNativeWindow( |
| 99 contents->GetTopLevelNativeWindow()); | 99 contents->GetTopLevelNativeWindow()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 api::webstore_private::Result WebstoreInstallResultToApiResult( | 102 api::webstore_private::Result WebstoreInstallResultToApiResult( |
| 103 webstore_install::Result result) { | 103 webstore_install::Result result) { |
| 104 switch (result) { | 104 switch (result) { |
| 105 case webstore_install::SUCCESS: | 105 case webstore_install::SUCCESS: |
| 106 return api::webstore_private::RESULT_SUCCESS; | 106 return api::webstore_private::RESULT_SUCCESS; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 WebstorePrivateGetEphemeralAppsEnabledFunction:: | 795 WebstorePrivateGetEphemeralAppsEnabledFunction:: |
| 796 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} | 796 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} |
| 797 | 797 |
| 798 ExtensionFunction::ResponseAction | 798 ExtensionFunction::ResponseAction |
| 799 WebstorePrivateGetEphemeralAppsEnabledFunction::Run() { | 799 WebstorePrivateGetEphemeralAppsEnabledFunction::Run() { |
| 800 return RespondNow(ArgumentList(GetEphemeralAppsEnabled::Results::Create( | 800 return RespondNow(ArgumentList(GetEphemeralAppsEnabled::Results::Create( |
| 801 EphemeralAppLauncher::IsFeatureEnabled()))); | 801 EphemeralAppLauncher::IsFeatureEnabled()))); |
| 802 } | 802 } |
| 803 | 803 |
| 804 } // namespace extensions | 804 } // namespace extensions |
| OLD | NEW |