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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc

Issue 300843013: Install and launch kiosk app from cached crx file at start up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 6 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 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 21 matching lines...) Expand all
32 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_FAILED_TO_LAUNCH); 32 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_FAILED_TO_LAUNCH);
33 33
34 case CRYPTOHOMED_NOT_RUNNING: 34 case CRYPTOHOMED_NOT_RUNNING:
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 case UNABLE_TO_DOWNLOAD:
43 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_DOWNLOAD);
44 case UNABLE_TO_LAUNCH:
45 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_UNABLE_TO_LAUNCH);
43 case USER_CANCEL: 46 case USER_CANCEL:
44 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_USER_CANCEL); 47 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_ERROR_USER_CANCEL);
45 } 48 }
46 49
47 NOTREACHED() << "Unknown kiosk app launch error, error=" << error; 50 NOTREACHED() << "Unknown kiosk app launch error, error=" << error;
48 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_FAILED_TO_LAUNCH); 51 return l10n_util::GetStringUTF8(IDS_KIOSK_APP_FAILED_TO_LAUNCH);
49 } 52 }
50 53
51 // static 54 // static
52 void KioskAppLaunchError::Save(KioskAppLaunchError::Error error) { 55 void KioskAppLaunchError::Save(KioskAppLaunchError::Error error) {
(...skipping 18 matching lines...) Expand all
71 74
72 // static 75 // static
73 void KioskAppLaunchError::Clear() { 76 void KioskAppLaunchError::Clear() {
74 PrefService* local_state = g_browser_process->local_state(); 77 PrefService* local_state = g_browser_process->local_state();
75 DictionaryPrefUpdate dict_update(local_state, 78 DictionaryPrefUpdate dict_update(local_state,
76 KioskAppManager::kKioskDictionaryName); 79 KioskAppManager::kKioskDictionaryName);
77 dict_update->Remove(kKeyLaunchError, NULL); 80 dict_update->Remove(kKeyLaunchError, NULL);
78 } 81 }
79 82
80 } // namespace chromeos 83 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698