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

Side by Side Diff: chromeos/dbus/cryptohome_client.cc

Issue 20799002: Fix CertLoader certificates_loaded() during notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed build on non-chromeos. Created 7 years, 4 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
« no previous file with comments | « chromeos/cert_loader.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/cryptohome_client.h" 5 #include "chromeos/dbus/cryptohome_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chromeos/cryptohome/async_method_caller.h" 9 #include "chromeos/cryptohome/async_method_caller.h"
10 #include "chromeos/dbus/blocking_method_caller.h" 10 #include "chromeos/dbus/blocking_method_caller.h"
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 base::MessageLoop::current()->PostTask( 1026 base::MessageLoop::current()->PostTask(
1027 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, true)); 1027 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, true));
1028 } 1028 }
1029 1029
1030 // CryptohomeClient override. 1030 // CryptohomeClient override.
1031 virtual void Pkcs11GetTpmTokenInfo( 1031 virtual void Pkcs11GetTpmTokenInfo(
1032 const Pkcs11GetTpmTokenInfoCallback& callback) OVERRIDE { 1032 const Pkcs11GetTpmTokenInfoCallback& callback) OVERRIDE {
1033 const char kStubLabel[] = "Stub TPM Token"; 1033 const char kStubLabel[] = "Stub TPM Token";
1034 const char kStubUserPin[] = "012345"; 1034 const char kStubUserPin[] = "012345";
1035 base::MessageLoop::current()->PostTask( 1035 base::MessageLoop::current()->PostTask(
1036 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, kStubLabel, 1036 FROM_HERE,
1037 kStubUserPin)); 1037 base::Bind(callback,
1038 DBUS_METHOD_CALL_SUCCESS,
1039 std::string(kStubLabel),
1040 std::string(kStubUserPin)));
1038 } 1041 }
1039 1042
1040 // CryptohomeClient override. 1043 // CryptohomeClient override.
1041 virtual bool InstallAttributesGet(const std::string& name, 1044 virtual bool InstallAttributesGet(const std::string& name,
1042 std::vector<uint8>* value, 1045 std::vector<uint8>* value,
1043 bool* successful) OVERRIDE { 1046 bool* successful) OVERRIDE {
1044 if (install_attrs_.find(name) != install_attrs_.end()) { 1047 if (install_attrs_.find(name) != install_attrs_.end()) {
1045 *value = install_attrs_[name]; 1048 *value = install_attrs_[name];
1046 *successful = true; 1049 *successful = true;
1047 } else { 1050 } else {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 return new CryptohomeClientStubImpl(); 1275 return new CryptohomeClientStubImpl();
1273 } 1276 }
1274 1277
1275 // static 1278 // static
1276 std::string CryptohomeClient::GetStubSanitizedUsername( 1279 std::string CryptohomeClient::GetStubSanitizedUsername(
1277 const std::string& username) { 1280 const std::string& username) {
1278 return username + kUserIdStubHashSuffix; 1281 return username + kUserIdStubHashSuffix;
1279 } 1282 }
1280 1283
1281 } // namespace chromeos 1284 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/cert_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698