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

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

Issue 384823002: Introduce a stable set of errors for inline install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace printf with vlog(1) in unrelated code so it passes presubmit Created 6 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
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 "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 void WebstorePrivateLaunchEphemeralAppFunction::OnLaunchComplete( 821 void WebstorePrivateLaunchEphemeralAppFunction::OnLaunchComplete(
822 webstore_install::Result result, const std::string& error) { 822 webstore_install::Result result, const std::string& error) {
823 // Translate between the EphemeralAppLauncher's error codes and the API 823 // Translate between the EphemeralAppLauncher's error codes and the API
824 // error codes. 824 // error codes.
825 LaunchEphemeralAppResult::Result api_result = 825 LaunchEphemeralAppResult::Result api_result =
826 LaunchEphemeralAppResult::RESULT_UNKNOWN_ERROR; 826 LaunchEphemeralAppResult::RESULT_UNKNOWN_ERROR;
827 switch (result) { 827 switch (result) {
828 case webstore_install::SUCCESS: 828 case webstore_install::SUCCESS:
829 api_result = LaunchEphemeralAppResult::RESULT_SUCCESS; 829 api_result = LaunchEphemeralAppResult::RESULT_SUCCESS;
830 break; 830 break;
831 case webstore_install::UNKNOWN_ERROR: 831 case webstore_install::OTHER_ERROR:
832 api_result = LaunchEphemeralAppResult::RESULT_UNKNOWN_ERROR; 832 api_result = LaunchEphemeralAppResult::RESULT_UNKNOWN_ERROR;
833 break; 833 break;
834 case webstore_install::INVALID_ID: 834 case webstore_install::INVALID_ID:
835 api_result = LaunchEphemeralAppResult::RESULT_INVALID_ID; 835 api_result = LaunchEphemeralAppResult::RESULT_INVALID_ID;
836 break; 836 break;
837 case webstore_install::NOT_PERMITTED: 837 case webstore_install::NOT_PERMITTED:
838 case webstore_install::WEBSTORE_REQUEST_ERROR: 838 case webstore_install::WEBSTORE_REQUEST_ERROR:
839 case webstore_install::INVALID_WEBSTORE_RESPONSE: 839 case webstore_install::INVALID_WEBSTORE_RESPONSE:
840 case webstore_install::INVALID_MANIFEST: 840 case webstore_install::INVALID_MANIFEST:
841 case webstore_install::ICON_ERROR: 841 case webstore_install::ICON_ERROR:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 WebstorePrivateGetEphemeralAppsEnabledFunction:: 900 WebstorePrivateGetEphemeralAppsEnabledFunction::
901 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {} 901 ~WebstorePrivateGetEphemeralAppsEnabledFunction() {}
902 902
903 bool WebstorePrivateGetEphemeralAppsEnabledFunction::RunSync() { 903 bool WebstorePrivateGetEphemeralAppsEnabledFunction::RunSync() {
904 results_ = GetEphemeralAppsEnabled::Results::Create( 904 results_ = GetEphemeralAppsEnabled::Results::Create(
905 EphemeralAppLauncher::IsFeatureEnabled()); 905 EphemeralAppLauncher::IsFeatureEnabled());
906 return true; 906 return true;
907 } 907 }
908 908
909 } // namespace extensions 909 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698