OLD | NEW |
---|---|
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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/sync/util/cryptographer.h" | 9 #include "sync/util/cryptographer.h" |
tim (not reviewing)
2012/03/15 06:21:10
this should go at top.
akalin
2012/03/15 07:38:26
Done.
| |
10 #include "chrome/browser/sync/util/encryptor.h" | 10 #include "sync/util/encryptor.h" |
11 | 11 |
12 namespace browser_sync { | 12 namespace browser_sync { |
13 | 13 |
14 const char kNigoriTag[] = "google_chrome_nigori"; | 14 const char kNigoriTag[] = "google_chrome_nigori"; |
15 | 15 |
16 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, | 16 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, |
17 // a username, and a password) by calling Permute on this string. Since the | 17 // a username, and a password) by calling Permute on this string. Since the |
18 // output of Permute is always the same for a given triplet, clients will always | 18 // output of Permute is always the same for a given triplet, clients will always |
19 // assign the same name to a particular triplet. | 19 // assign the same name to a particular triplet. |
20 const char kNigoriKeyName[] = "nigori-key"; | 20 const char kNigoriKeyName[] = "nigori-key"; |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
437 continue; | 437 continue; |
438 } | 438 } |
439 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); | 439 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); |
440 } | 440 } |
441 } | 441 } |
442 DCHECK(nigoris_.end() != nigoris_.find(default_key_name)); | 442 DCHECK(nigoris_.end() != nigoris_.find(default_key_name)); |
443 default_nigori_ = &*nigoris_.find(default_key_name); | 443 default_nigori_ = &*nigoris_.find(default_key_name); |
444 } | 444 } |
445 | 445 |
446 } // namespace browser_sync | 446 } // namespace browser_sync |
OLD | NEW |