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

Side by Side Diff: Source/WebKit/chromium/src/WebDatabase.cpp

Issue 13774005: Remove the ENABLE_SQL_DATABASE compile-time flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: python Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "DatabaseBackendBase.h" 34 #include "DatabaseBackendBase.h"
35 #include "DatabaseManager.h" 35 #include "DatabaseManager.h"
36 #include "QuotaTracker.h" 36 #include "QuotaTracker.h"
37 #include "SecurityOrigin.h" 37 #include "SecurityOrigin.h"
38 #include "WebDatabaseObserver.h" 38 #include "WebDatabaseObserver.h"
39 #include <public/WebString.h> 39 #include <public/WebString.h>
40 #include <wtf/PassRefPtr.h> 40 #include <wtf/PassRefPtr.h>
41 #include <wtf/RefPtr.h> 41 #include <wtf/RefPtr.h>
42 42
43 #if !ENABLE(SQL_DATABASE)
44 namespace WebCore {
45 class DatabaseBackendBase {
46 public:
47 String stringIdentifier() const { return String(); }
48 String displayName() const { return String(); }
49 unsigned long long estimatedSize() const { return 0; }
50 SecurityOrigin* securityOrigin() const { return 0; }
51 bool isSyncDatabase() const { return false; }
52 };
53 }
54 #endif // !ENABLE(SQL_DATABASE)
55
56 using namespace WebCore; 43 using namespace WebCore;
57 44
58 namespace WebKit { 45 namespace WebKit {
59 46
60 static WebDatabaseObserver* databaseObserver = 0; 47 static WebDatabaseObserver* databaseObserver = 0;
61 48
62 WebString WebDatabase::name() const 49 WebString WebDatabase::name() const
63 { 50 {
64 ASSERT(m_database); 51 ASSERT(m_database);
65 return m_database->stringIdentifier(); 52 return m_database->stringIdentifier();
(...skipping 28 matching lines...) Expand all
94 databaseObserver = observer; 81 databaseObserver = observer;
95 } 82 }
96 83
97 WebDatabaseObserver* WebDatabase::observer() 84 WebDatabaseObserver* WebDatabase::observer()
98 { 85 {
99 return databaseObserver; 86 return databaseObserver;
100 } 87 }
101 88
102 void WebDatabase::updateDatabaseSize(const WebString& originIdentifier, const We bString& name, long long size) 89 void WebDatabase::updateDatabaseSize(const WebString& originIdentifier, const We bString& name, long long size)
103 { 90 {
104 #if ENABLE(SQL_DATABASE)
105 QuotaTracker::instance().updateDatabaseSize(originIdentifier, name, size); 91 QuotaTracker::instance().updateDatabaseSize(originIdentifier, name, size);
106 #endif
107 } 92 }
108 93
109 void WebDatabase::updateSpaceAvailable(const WebString& originIdentifier, long l ong spaceAvailable) 94 void WebDatabase::updateSpaceAvailable(const WebString& originIdentifier, long l ong spaceAvailable)
110 { 95 {
111 #if ENABLE(SQL_DATABASE)
112 QuotaTracker::instance().updateSpaceAvailableToOrigin(originIdentifier, spac eAvailable); 96 QuotaTracker::instance().updateSpaceAvailableToOrigin(originIdentifier, spac eAvailable);
113 #endif
114 } 97 }
115 98
116 void WebDatabase::resetSpaceAvailable(const WebString& originIdentifier) 99 void WebDatabase::resetSpaceAvailable(const WebString& originIdentifier)
117 { 100 {
118 #if ENABLE(SQL_DATABASE)
119 QuotaTracker::instance().resetSpaceAvailableToOrigin(originIdentifier); 101 QuotaTracker::instance().resetSpaceAvailableToOrigin(originIdentifier);
120 #endif
121 } 102 }
122 103
123 void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, co nst WebString& databaseName) 104 void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, co nst WebString& databaseName)
124 { 105 {
125 #if ENABLE(SQL_DATABASE)
126 DatabaseManager::manager().closeDatabasesImmediately(originIdentifier, datab aseName); 106 DatabaseManager::manager().closeDatabasesImmediately(originIdentifier, datab aseName);
127 #endif
128 } 107 }
129 108
130 WebDatabase::WebDatabase(const DatabaseBackendBase* database) 109 WebDatabase::WebDatabase(const DatabaseBackendBase* database)
131 : m_database(database) 110 : m_database(database)
132 { 111 {
133 } 112 }
134 113
135 } // namespace WebKit 114 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/DatabaseObserver.cpp ('k') | Source/WebKit/chromium/src/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698