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

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

Issue 12870010: Add device-level token entryption to CertLibrary. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renamed methods per review comments. Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cert_library.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_launcher.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_launcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/chromeos/cros/cert_library.h" 10 #include "chrome/browser/chromeos/cros/cert_library.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 running_instance_ = NULL; 119 running_instance_ = NULL;
120 success_ = success; 120 success_ = success;
121 121
122 if (!callback_.is_null()) 122 if (!callback_.is_null())
123 callback_.Run(success_); 123 callback_.Run(success_);
124 } 124 }
125 125
126 void KioskAppLauncher::StartMount() { 126 void KioskAppLauncher::StartMount() {
127 const std::string token = 127 const std::string token =
128 CrosLibrary::Get()->GetCertLibrary()->EncryptToken(app_id_); 128 CrosLibrary::Get()->GetCertLibrary()->EncryptWithUserKey(app_id_);
129 129
130 cryptohome::AsyncMethodCaller::GetInstance()->AsyncMount( 130 cryptohome::AsyncMethodCaller::GetInstance()->AsyncMount(
131 app_id_, 131 app_id_,
132 token, 132 token,
133 cryptohome::CREATE_IF_MISSING, 133 cryptohome::CREATE_IF_MISSING,
134 base::Bind(&KioskAppLauncher::MountCallback, 134 base::Bind(&KioskAppLauncher::MountCallback,
135 base::Unretained(this))); 135 base::Unretained(this)));
136 } 136 }
137 137
138 void KioskAppLauncher::MountCallback(bool mount_success, 138 void KioskAppLauncher::MountCallback(bool mount_success,
139 cryptohome::MountError mount_error) { 139 cryptohome::MountError mount_error) {
140 if (!mount_success) { 140 if (!mount_success) {
141 LOG(ERROR) << "Failed to mount, error=" << mount_error; 141 LOG(ERROR) << "Failed to mount, error=" << mount_error;
142 ReportLaunchResult(false); 142 ReportLaunchResult(false);
143 return; 143 return;
144 } 144 }
145 145
146 RestartChrome(GetKioskAppCommandLine(app_id_)); 146 RestartChrome(GetKioskAppCommandLine(app_id_));
147 ReportLaunchResult(true); 147 ReportLaunchResult(true);
148 } 148 }
149 149
150 } // namespace chromeos 150 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cert_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698