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

Side by Side Diff: sync/util/cryptographer.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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 | « sync/util/cryptographer.h ('k') | sync/util/cryptographer_unittest.cc » ('j') | 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 "sync/util/cryptographer.h"
6
5 #include <algorithm> 7 #include <algorithm>
6 8
7 #include "base/base64.h" 9 #include "base/base64.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "chrome/browser/sync/util/cryptographer.h" 11 #include "sync/util/encryptor.h"
10 #include "chrome/browser/sync/util/encryptor.h"
11 12
12 namespace browser_sync { 13 namespace browser_sync {
13 14
14 const char kNigoriTag[] = "google_chrome_nigori"; 15 const char kNigoriTag[] = "google_chrome_nigori";
15 16
16 // We name a particular Nigori instance (ie. a triplet consisting of a hostname, 17 // 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 18 // 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 19 // output of Permute is always the same for a given triplet, clients will always
19 // assign the same name to a particular triplet. 20 // assign the same name to a particular triplet.
20 const char kNigoriKeyName[] = "nigori-key"; 21 const char kNigoriKeyName[] = "nigori-key";
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 continue; 438 continue;
438 } 439 }
439 nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); 440 nigoris_[key.name()] = make_linked_ptr(new_nigori.release());
440 } 441 }
441 } 442 }
442 DCHECK(nigoris_.end() != nigoris_.find(default_key_name)); 443 DCHECK(nigoris_.end() != nigoris_.find(default_key_name));
443 default_nigori_ = &*nigoris_.find(default_key_name); 444 default_nigori_ = &*nigoris_.find(default_key_name);
444 } 445 }
445 446
446 } // namespace browser_sync 447 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/util/cryptographer.h ('k') | sync/util/cryptographer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698