| 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/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 "app/sql/statement.h" | |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 #include "chrome/browser/password_manager/encryptor.h" | 11 #include "chrome/browser/password_manager/encryptor.h" |
| 12 #include "sql/statement.h" |
| 13 | 13 |
| 14 bool TokenServiceTable::Init() { | 14 bool TokenServiceTable::Init() { |
| 15 if (!db_->DoesTableExist("token_service")) { | 15 if (!db_->DoesTableExist("token_service")) { |
| 16 if (!db_->Execute("CREATE TABLE token_service (" | 16 if (!db_->Execute("CREATE TABLE token_service (" |
| 17 "service VARCHAR PRIMARY KEY NOT NULL," | 17 "service VARCHAR PRIMARY KEY NOT NULL," |
| 18 "encrypted_token BLOB)")) { | 18 "encrypted_token BLOB)")) { |
| 19 NOTREACHED(); | 19 NOTREACHED(); |
| 20 return false; | 20 return false; |
| 21 } | 21 } |
| 22 } | 22 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 Encryptor::DecryptString(encrypted_token, &decrypted_token); | 83 Encryptor::DecryptString(encrypted_token, &decrypted_token); |
| 84 (*tokens)[service] = decrypted_token; | 84 (*tokens)[service] = decrypted_token; |
| 85 } else { | 85 } else { |
| 86 NOTREACHED(); | 86 NOTREACHED(); |
| 87 return false; | 87 return false; |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 return true; | 90 return true; |
| 91 } | 91 } |
| 92 | 92 |
| OLD | NEW |