| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/child/web_database_observer_impl.h" | 5 #include "content/child/web_database_observer_impl.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "content/common/database_messages.h" | 9 #include "content/common/database_messages.h" |
| 10 #include "third_party/WebKit/public/platform/WebCString.h" | 10 #include "third_party/WebKit/public/platform/WebCString.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 result, kResultHistogramSize); \ | 55 result, kResultHistogramSize); \ |
| 56 if (result) { \ | 56 if (result) { \ |
| 57 UMA_HISTOGRAM_ENUMERATION("websql.Async." name ".ErrorSite", \ | 57 UMA_HISTOGRAM_ENUMERATION("websql.Async." name ".ErrorSite", \ |
| 58 callsite, kCallsiteHistogramSize); \ | 58 callsite, kCallsiteHistogramSize); \ |
| 59 } \ | 59 } \ |
| 60 } \ | 60 } \ |
| 61 } while (0) | 61 } while (0) |
| 62 | 62 |
| 63 } // namespace | 63 } // namespace |
| 64 | 64 |
| 65 WebDatabaseObserverImpl::WebDatabaseObserverImpl( | 65 WebDatabaseObserverImpl::WebDatabaseObserverImpl(IPC::SyncMessageFilter* sender) |
| 66 IPC::SyncMessageFilter* sender) | |
| 67 : sender_(sender), | 66 : sender_(sender), |
| 68 open_connections_(new webkit_database::DatabaseConnectionsWrapper) { | 67 open_connections_(new storage::DatabaseConnectionsWrapper) { |
| 69 DCHECK(sender); | 68 DCHECK(sender); |
| 70 } | 69 } |
| 71 | 70 |
| 72 WebDatabaseObserverImpl::~WebDatabaseObserverImpl() { | 71 WebDatabaseObserverImpl::~WebDatabaseObserverImpl() { |
| 73 } | 72 } |
| 74 | 73 |
| 75 void WebDatabaseObserverImpl::databaseOpened( | 74 void WebDatabaseObserverImpl::databaseOpened( |
| 76 const WebString& origin_identifier, | 75 const WebString& origin_identifier, |
| 77 const WebString& database_name, | 76 const WebString& database_name, |
| 78 const WebString& database_display_name, | 77 const WebString& database_display_name, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // high frequency (per-sqlstatement). | 178 // high frequency (per-sqlstatement). |
| 180 if (error == SQLITE_CORRUPT || error == SQLITE_NOTADB) { | 179 if (error == SQLITE_CORRUPT || error == SQLITE_NOTADB) { |
| 181 sender_->Send(new DatabaseHostMsg_HandleSqliteError( | 180 sender_->Send(new DatabaseHostMsg_HandleSqliteError( |
| 182 origin_identifier.utf8(), | 181 origin_identifier.utf8(), |
| 183 database_name, | 182 database_name, |
| 184 error)); | 183 error)); |
| 185 } | 184 } |
| 186 } | 185 } |
| 187 | 186 |
| 188 } // namespace content | 187 } // namespace content |
| OLD | NEW |