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

Unified Diff: chrome/common/web_database_observer_impl.cc

Issue 6691002: Move AppCache common code to content and split off AppCache messages into the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/web_database_observer_impl.h ('k') | chrome/common/webmessageportchannel_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/web_database_observer_impl.cc
===================================================================
--- chrome/common/web_database_observer_impl.cc (revision 77976)
+++ chrome/common/web_database_observer_impl.cc (working copy)
@@ -1,53 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/common/web_database_observer_impl.h"
-
-#include "base/auto_reset.h"
-#include "base/message_loop.h"
-#include "base/string16.h"
-#include "content/common/database_messages.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
-
-WebDatabaseObserverImpl::WebDatabaseObserverImpl(
- IPC::Message::Sender* sender)
- : sender_(sender),
- waiting_for_dbs_to_close_(false) {
-}
-
-void WebDatabaseObserverImpl::databaseOpened(
- const WebKit::WebDatabase& database) {
- string16 origin_identifier = database.securityOrigin().databaseIdentifier();
- string16 database_name = database.name();
- sender_->Send(new DatabaseHostMsg_Opened(
- origin_identifier, database_name,
- database.displayName(), database.estimatedSize()));
- database_connections_.AddConnection(origin_identifier, database_name);
-}
-
-void WebDatabaseObserverImpl::databaseModified(
- const WebKit::WebDatabase& database) {
- sender_->Send(new DatabaseHostMsg_Modified(
- database.securityOrigin().databaseIdentifier(), database.name()));
-}
-
-void WebDatabaseObserverImpl::databaseClosed(
- const WebKit::WebDatabase& database) {
- string16 origin_identifier = database.securityOrigin().databaseIdentifier();
- string16 database_name = database.name();
- sender_->Send(new DatabaseHostMsg_Closed(
- origin_identifier, database_name));
- database_connections_.RemoveConnection(origin_identifier, database_name);
- if (waiting_for_dbs_to_close_ && database_connections_.IsEmpty())
- MessageLoop::current()->Quit();
-}
-
-void WebDatabaseObserverImpl::WaitForAllDatabasesToClose() {
- if (!database_connections_.IsEmpty()) {
- AutoReset<bool> waiting_for_dbs_auto_reset(&waiting_for_dbs_to_close_, true);
- MessageLoop::ScopedNestableTaskAllower nestable(MessageLoop::current());
- MessageLoop::current()->Run();
- }
-}
« no previous file with comments | « chrome/common/web_database_observer_impl.h ('k') | chrome/common/webmessageportchannel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698