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

Side by Side Diff: chrome/browser/webdata/token_service_table.cc

Issue 12902030: Make Encryptor a component. Used by //chrome and (soon) //components/webdata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove duplicate include. Created 7 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 | « chrome/browser/webdata/autofill_table_unittest.cc ('k') | chrome/chrome_browser.gypi » ('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) 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/webdata/token_service_table.h" 5 #include "chrome/browser/webdata/token_service_table.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "chrome/browser/password_manager/encryptor.h"
12 #include "chrome/browser/webdata/web_database.h" 11 #include "chrome/browser/webdata/web_database.h"
12 #include "components/webdata/encryptor/encryptor.h"
13 #include "sql/statement.h" 13 #include "sql/statement.h"
14 14
15 namespace { 15 namespace {
16 16
17 int table_key = 0; 17 int table_key = 0;
18 18
19 WebDatabaseTable::TypeKey GetKey() { 19 WebDatabaseTable::TypeKey GetKey() {
20 return reinterpret_cast<void*>(&table_key); 20 return reinterpret_cast<void*>(&table_key);
21 } 21 }
22 22
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (entry_ok) { 99 if (entry_ok) {
100 Encryptor::DecryptString(encrypted_token, &decrypted_token); 100 Encryptor::DecryptString(encrypted_token, &decrypted_token);
101 (*tokens)[service] = decrypted_token; 101 (*tokens)[service] = decrypted_token;
102 } else { 102 } else {
103 NOTREACHED(); 103 NOTREACHED();
104 return false; 104 return false;
105 } 105 }
106 } 106 }
107 return true; 107 return true;
108 } 108 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autofill_table_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698