| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/app_mode/kiosk_app_launch_error.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
| 6 | 6 |
| 7 #include "base/prefs/scoped_user_pref_update.h" | 7 #include "base/prefs/scoped_user_pref_update.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 9 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 case ALREADY_MOUNTED: | 35 case ALREADY_MOUNTED: |
| 36 case UNABLE_TO_MOUNT: | 36 case UNABLE_TO_MOUNT: |
| 37 case UNABLE_TO_REMOVE: | 37 case UNABLE_TO_REMOVE: |
| 38 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_MOUNT); | 38 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_MOUNT); |
| 39 | 39 |
| 40 case UNABLE_TO_INSTALL: | 40 case UNABLE_TO_INSTALL: |
| 41 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_INSTALL); | 41 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_INSTALL); |
| 42 | 42 |
| 43 case USER_CANCEL: | 43 case USER_CANCEL: |
| 44 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_USER_CANCEL); | 44 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_USER_CANCEL); |
| 45 |
| 46 case UNABLE_TO_DOWNLOAD: |
| 47 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_DOWNLOAD); |
| 48 |
| 49 case UNABLE_TO_LAUNCH: |
| 50 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_LAUNCH); |
| 45 } | 51 } |
| 46 | 52 |
| 47 NOTREACHED() << "Unknown kiosk app launch error, error=" << error; | 53 NOTREACHED() << "Unknown kiosk app launch error, error=" << error; |
| 48 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_FAILED_TO_LAUNCH); | 54 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_FAILED_TO_LAUNCH); |
| 49 } | 55 } |
| 50 | 56 |
| 51 // static | 57 // static |
| 52 void KioskAppLaunchError::Save(KioskAppLaunchError::Error error) { | 58 void KioskAppLaunchError::Save(KioskAppLaunchError::Error error) { |
| 53 PrefService* local_state = g_browser_process->local_state(); | 59 PrefService* local_state = g_browser_process->local_state(); |
| 54 DictionaryPrefUpdate dict_update(local_state, | 60 DictionaryPrefUpdate dict_update(local_state, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 71 | 77 |
| 72 // static | 78 // static |
| 73 void KioskAppLaunchError::Clear() { | 79 void KioskAppLaunchError::Clear() { |
| 74 PrefService* local_state = g_browser_process->local_state(); | 80 PrefService* local_state = g_browser_process->local_state(); |
| 75 DictionaryPrefUpdate dict_update(local_state, | 81 DictionaryPrefUpdate dict_update(local_state, |
| 76 KioskAppManager::kKioskDictionaryName); | 82 KioskAppManager::kKioskDictionaryName); |
| 77 dict_update->Remove(kKeyLaunchError, NULL); | 83 dict_update->Remove(kKeyLaunchError, NULL); |
| 78 } | 84 } |
| 79 | 85 |
| 80 } // namespace chromeos | 86 } // namespace chromeos |
| OLD | NEW |