| 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 "base/base64.h" | 5 #include "base/base64.h" |
| 6 #include "chrome/browser/sync/util/cryptographer.h" | 6 #include "chrome/browser/sync/encryption/cryptographer.h" |
| 7 #include "chrome/browser/password_manager/encryptor.h" | 7 #include "chrome/browser/password_manager/encryptor.h" |
| 8 | 8 |
| 9 namespace browser_sync { | 9 namespace browser_sync { |
| 10 | 10 |
| 11 const char kNigoriTag[] = "google_chrome_nigori"; | 11 const char kNigoriTag[] = "google_chrome_nigori"; |
| 12 | 12 |
| 13 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, | 13 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, |
| 14 // a username, and a password) by calling Permute on this string. Since the | 14 // a username, and a password) by calling Permute on this string. Since the |
| 15 // output of Permute is always the same for a given triplet, clients will always | 15 // output of Permute is always the same for a given triplet, clients will always |
| 16 // assign the same name to a particular triplet. | 16 // assign the same name to a particular triplet. |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 continue; | 411 continue; |
| 412 } | 412 } |
| 413 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); | 413 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 DCHECK(nigoris_.end() != nigoris_.find(default_key_name)); | 416 DCHECK(nigoris_.end() != nigoris_.find(default_key_name)); |
| 417 default_nigori_ = &*nigoris_.find(default_key_name); | 417 default_nigori_ = &*nigoris_.find(default_key_name); |
| 418 } | 418 } |
| 419 | 419 |
| 420 } // namespace browser_sync | 420 } // namespace browser_sync |
| OLD | NEW |