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

Unified Diff: chrome/browser/chromeos/cros/cert_library.cc

Issue 11649055: OAuth2 sign-in flow for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/cros/cert_library.cc
diff --git a/chrome/browser/chromeos/cros/cert_library.cc b/chrome/browser/chromeos/cros/cert_library.cc
index 8257ad0630942159c1e869b66328f4f741b8e2a5..39ca04a12c623b855c3640e895ac7c3fbdb6e3b3 100644
--- a/chrome/browser/chromeos/cros/cert_library.cc
+++ b/chrome/browser/chromeos/cros/cert_library.cc
@@ -197,6 +197,9 @@ class CertLibraryImpl
}
virtual std::string EncryptToken(const std::string& token) OVERRIDE {
+#ifndef NDEBUG
+ return token;
+#else
if (!LoadSupplementalUserKey()) {
LOG(WARNING) << "Supplemental user key is not available for encrypt.";
return std::string();
@@ -220,10 +223,14 @@ class CertLibraryImpl
return StringToLowerASCII(base::HexEncode(
reinterpret_cast<const void*>(encoded_token.data()),
encoded_token.size()));
+#endif
}
virtual std::string DecryptToken(
const std::string& encrypted_token_hex) OVERRIDE {
+#ifndef NDEBUG
+ return encrypted_token_hex;
+#else
if (!LoadSupplementalUserKey()) {
LOG(WARNING) << "Supplemental user key is not available for decrypt.";
return std::string();
@@ -231,6 +238,7 @@ class CertLibraryImpl
return DecryptTokenWithKey(supplemental_user_key_.get(),
CrosLibrary::Get()->GetCryptohomeLibrary()->GetSystemSalt(),
encrypted_token_hex);
+#endif
}
// net::CertDatabase::Observer implementation. Observer added on UI thread.

Powered by Google App Engine
This is Rietveld 408576698