OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/google_authenticator.h" | 5 #include "chrome/browser/chromeos/login/google_authenticator.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/sha2.h" | |
15 #include "base/string_util.h" | 14 #include "base/string_util.h" |
16 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
17 #include "base/third_party/nss/blapi.h" | 16 #include "crypto/third_party/nss/blapi.h" |
18 #include "base/third_party/nss/sha256.h" | 17 #include "crypto/third_party/nss/sha256.h" |
19 #include "chrome/browser/chromeos/boot_times_loader.h" | 18 #include "chrome/browser/chromeos/boot_times_loader.h" |
20 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 19 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
21 #include "chrome/browser/chromeos/login/auth_response_handler.h" | 20 #include "chrome/browser/chromeos/login/auth_response_handler.h" |
22 #include "chrome/browser/chromeos/login/authentication_notification_details.h" | 21 #include "chrome/browser/chromeos/login/authentication_notification_details.h" |
23 #include "chrome/browser/chromeos/login/login_status_consumer.h" | 22 #include "chrome/browser/chromeos/login/login_status_consumer.h" |
24 #include "chrome/browser/chromeos/login/ownership_service.h" | 23 #include "chrome/browser/chromeos/login/ownership_service.h" |
25 #include "chrome/browser/chromeos/login/user_manager.h" | 24 #include "chrome/browser/chromeos/login/user_manager.h" |
26 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
28 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 const unsigned int len) { | 479 const unsigned int len) { |
481 if (len < 2*binary_len) | 480 if (len < 2*binary_len) |
482 return false; | 481 return false; |
483 memset(hex_string, 0, len); | 482 memset(hex_string, 0, len); |
484 for (uint i = 0, j = 0; i < binary_len; i++, j+=2) | 483 for (uint i = 0, j = 0; i < binary_len; i++, j+=2) |
485 snprintf(hex_string + j, len - j, "%02x", binary[i]); | 484 snprintf(hex_string + j, len - j, "%02x", binary[i]); |
486 return true; | 485 return true; |
487 } | 486 } |
488 | 487 |
489 } // namespace chromeos | 488 } // namespace chromeos |
OLD | NEW |