| 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 "chrome/browser/webdata/web_database.h" | 5 #include "chrome/browser/webdata/web_database.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/webdata/autofill_table.h" | 9 #include "chrome/browser/webdata/autofill_table.h" |
| 10 #include "chrome/browser/webdata/keyword_table.h" | 10 #include "chrome/browser/webdata/keyword_table.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 TokenServiceTable* WebDatabase::GetTokenServiceTable() { | 76 TokenServiceTable* WebDatabase::GetTokenServiceTable() { |
| 77 return token_service_table_.get(); | 77 return token_service_table_.get(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 WebAppsTable* WebDatabase::GetWebAppsTable() { | 80 WebAppsTable* WebDatabase::GetWebAppsTable() { |
| 81 return web_apps_table_.get(); | 81 return web_apps_table_.get(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 #if defined(ENABLE_WEB_INTENTS) | |
| 85 WebIntentsTable* WebDatabase::GetWebIntentsTable() { | |
| 86 return web_intents_table_.get(); | |
| 87 } | |
| 88 #endif | |
| 89 | |
| 90 sql::Connection* WebDatabase::GetSQLConnection() { | 84 sql::Connection* WebDatabase::GetSQLConnection() { |
| 91 return &db_; | 85 return &db_; |
| 92 } | 86 } |
| 93 | 87 |
| 94 sql::InitStatus WebDatabase::Init(const base::FilePath& db_name, | 88 sql::InitStatus WebDatabase::Init(const base::FilePath& db_name, |
| 95 const std::string& app_locale) { | 89 const std::string& app_locale) { |
| 96 // When running in unit tests, there is already a NotificationService object. | 90 // When running in unit tests, there is already a NotificationService object. |
| 97 // Since only one can exist at a time per thread, check first. | 91 // Since only one can exist at a time per thread, check first. |
| 98 if (!content::NotificationService::current()) | 92 if (!content::NotificationService::current()) |
| 99 notification_service_.reset(content::NotificationService::Create()); | 93 notification_service_.reset(content::NotificationService::Create()); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 364 |
| 371 // Add successive versions here. Each should set the version number and | 365 // Add successive versions here. Each should set the version number and |
| 372 // compatible version number as appropriate, then fall through to the next | 366 // compatible version number as appropriate, then fall through to the next |
| 373 // case. | 367 // case. |
| 374 | 368 |
| 375 case kCurrentVersionNumber: | 369 case kCurrentVersionNumber: |
| 376 // No migration needed. | 370 // No migration needed. |
| 377 return sql::INIT_OK; | 371 return sql::INIT_OK; |
| 378 } | 372 } |
| 379 } | 373 } |
| OLD | NEW |