summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 22:08:56 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-09 22:08:56 +0000
commit0034fcdedcb38e955264fde859e7c60edacca948 (patch)
treeec891f4b28fe481acea1363fea2423787b8b6d4b
parent29ad68e431466e1fdc31791c1068505f329a55b8 (diff)
downloadchromium_src-0034fcdedcb38e955264fde859e7c60edacca948.zip
chromium_src-0034fcdedcb38e955264fde859e7c60edacca948.tar.gz
chromium_src-0034fcdedcb38e955264fde859e7c60edacca948.tar.bz2
Clean-up inline members of nested classes (webkit/)
Due to a bug, the Clang-plugin style checker failed to warn about inline constructors, destructors, non-empty virtual methods, etc. for nested classes. The plugin has been fixed, and this patch is part of a clean-up of all the code that now causes the plugin to issue errors. BUG=139346 Review URL: https://chromiumcodereview.appspot.com/10829258 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150912 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/appcache/appcache_disk_cache.cc17
-rw-r--r--webkit/appcache/appcache_disk_cache.h14
-rw-r--r--webkit/fileapi/file_system_file_util.cc25
-rw-r--r--webkit/fileapi/file_system_file_util.h8
-rw-r--r--webkit/fileapi/webkit_fileapi.gypi1
-rw-r--r--webkit/quota/quota_manager.cc7
-rw-r--r--webkit/quota/quota_manager.h4
-rw-r--r--webkit/quota/quota_temporary_storage_evictor.cc10
-rw-r--r--webkit/quota/quota_temporary_storage_evictor.h10
-rw-r--r--webkit/tools/test_shell/test_shell.cc5
-rw-r--r--webkit/tools/test_shell/test_shell.h3
11 files changed, 74 insertions, 30 deletions
diff --git a/webkit/appcache/appcache_disk_cache.cc b/webkit/appcache/appcache_disk_cache.cc
index 79ab58b..88bea87 100644
--- a/webkit/appcache/appcache_disk_cache.cc
+++ b/webkit/appcache/appcache_disk_cache.cc
@@ -243,6 +243,22 @@ int AppCacheDiskCache::DoomEntry(int64 key,
return (new ActiveCall(this))->DoomEntry(key, callback);
}
+AppCacheDiskCache::PendingCall::PendingCall()
+ : call_type(CREATE),
+ key(0),
+ entry(NULL) {
+}
+
+AppCacheDiskCache::PendingCall::PendingCall(PendingCallType call_type,
+ int64 key,
+ Entry** entry,
+ const net::CompletionCallback& callback)
+ : call_type(call_type),
+ key(key),
+ entry(entry),
+ callback(callback) {
+}
+
AppCacheDiskCache::PendingCall::~PendingCall() {}
int AppCacheDiskCache::Init(net::CacheType cache_type,
@@ -304,4 +320,3 @@ void AppCacheDiskCache::OnCreateBackendComplete(int rv) {
}
} // namespace appcache
-
diff --git a/webkit/appcache/appcache_disk_cache.h b/webkit/appcache/appcache_disk_cache.h
index b361793..27e8905 100644
--- a/webkit/appcache/appcache_disk_cache.h
+++ b/webkit/appcache/appcache_disk_cache.h
@@ -64,19 +64,10 @@ class APPCACHE_EXPORT AppCacheDiskCache
Entry** entry;
net::CompletionCallback callback;
- PendingCall()
- : call_type(CREATE),
- key(0),
- entry(NULL) {
- }
+ PendingCall();
PendingCall(PendingCallType call_type, int64 key,
- Entry** entry, const net::CompletionCallback& callback)
- : call_type(call_type),
- key(key),
- entry(entry),
- callback(callback) {
- }
+ Entry** entry, const net::CompletionCallback& callback);
~PendingCall();
};
@@ -107,4 +98,3 @@ class APPCACHE_EXPORT AppCacheDiskCache
} // namespace appcache
#endif // WEBKIT_APPCACHE_APPCACHE_DISK_CACHE_H_
-
diff --git a/webkit/fileapi/file_system_file_util.cc b/webkit/fileapi/file_system_file_util.cc
new file mode 100644
index 0000000..46b8b02
--- /dev/null
+++ b/webkit/fileapi/file_system_file_util.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 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 "webkit/fileapi/file_system_file_util.h"
+
+namespace fileapi {
+
+FilePath FileSystemFileUtil::EmptyFileEnumerator::Next() {
+ return FilePath();
+}
+
+int64 FileSystemFileUtil::EmptyFileEnumerator::Size() {
+ return 0;
+}
+
+base::Time FileSystemFileUtil::EmptyFileEnumerator::LastModifiedTime() {
+ return base::Time();
+}
+
+bool FileSystemFileUtil::EmptyFileEnumerator::IsDirectory() {
+ return false;
+}
+
+} // namespace fileapi
diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/file_system_file_util.h
index 8205dfd..26b98dd 100644
--- a/webkit/fileapi/file_system_file_util.h
+++ b/webkit/fileapi/file_system_file_util.h
@@ -61,10 +61,10 @@ class FILEAPI_EXPORT FileSystemFileUtil {
};
class EmptyFileEnumerator : public AbstractFileEnumerator {
- virtual FilePath Next() OVERRIDE { return FilePath(); }
- virtual int64 Size() OVERRIDE { return 0; }
- virtual base::Time LastModifiedTime() OVERRIDE { return base::Time(); }
- virtual bool IsDirectory() OVERRIDE { return false; }
+ virtual FilePath Next() OVERRIDE;
+ virtual int64 Size() OVERRIDE;
+ virtual base::Time LastModifiedTime() OVERRIDE;
+ virtual bool IsDirectory() OVERRIDE;
};
virtual ~FileSystemFileUtil() {}
diff --git a/webkit/fileapi/webkit_fileapi.gypi b/webkit/fileapi/webkit_fileapi.gypi
index 7bcb666..b5928bd 100644
--- a/webkit/fileapi/webkit_fileapi.gypi
+++ b/webkit/fileapi/webkit_fileapi.gypi
@@ -30,6 +30,7 @@
'file_system_directory_database.h',
'file_system_file_stream_reader.cc',
'file_system_file_stream_reader.h',
+ 'file_system_file_util.cc',
'file_system_file_util.h',
'file_system_file_util_proxy.cc',
'file_system_file_util_proxy.h',
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 730ec8d..0028cd3 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -1341,6 +1341,13 @@ QuotaManager::~QuotaManager() {
db_thread_->DeleteSoon(FROM_HERE, database_.release());
}
+QuotaManager::EvictionContext::EvictionContext()
+ : evicted_type(kStorageTypeUnknown) {
+}
+
+QuotaManager::EvictionContext::~EvictionContext() {
+}
+
void QuotaManager::LazyInitialize() {
DCHECK(io_thread_->BelongsToCurrentThread());
if (database_.get()) {
diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h
index 86e7381..6390b73 100644
--- a/webkit/quota/quota_manager.h
+++ b/webkit/quota/quota_manager.h
@@ -253,8 +253,8 @@ class QuotaManager : public QuotaTaskObserver,
DumpOriginInfoTableCallback;
struct EvictionContext {
- EvictionContext() : evicted_type(kStorageTypeUnknown) {}
- virtual ~EvictionContext() {}
+ EvictionContext();
+ virtual ~EvictionContext();
GURL evicted_origin;
StorageType evicted_type;
diff --git a/webkit/quota/quota_temporary_storage_evictor.cc b/webkit/quota/quota_temporary_storage_evictor.cc
index 689db4d..452bb4f 100644
--- a/webkit/quota/quota_temporary_storage_evictor.cc
+++ b/webkit/quota/quota_temporary_storage_evictor.cc
@@ -34,6 +34,16 @@ namespace quota {
const int QuotaTemporaryStorageEvictor::
kMinAvailableDiskSpaceToStartEvictionNotSpecified = -1;
+QuotaTemporaryStorageEvictor::EvictionRoundStatistics::EvictionRoundStatistics()
+ : in_round(false),
+ is_initialized(false),
+ usage_overage_at_round(-1),
+ diskspace_shortage_at_round(-1),
+ usage_on_beginning_of_round(-1),
+ usage_on_end_of_round(-1),
+ num_evicted_origins_in_round(0) {
+}
+
QuotaTemporaryStorageEvictor::QuotaTemporaryStorageEvictor(
QuotaEvictionHandler* quota_eviction_handler,
int64 interval_ms)
diff --git a/webkit/quota/quota_temporary_storage_evictor.h b/webkit/quota/quota_temporary_storage_evictor.h
index 2205f66..d526a70 100644
--- a/webkit/quota/quota_temporary_storage_evictor.h
+++ b/webkit/quota/quota_temporary_storage_evictor.h
@@ -46,15 +46,7 @@ class QuotaTemporaryStorageEvictor : public base::NonThreadSafe {
};
struct EvictionRoundStatistics {
- EvictionRoundStatistics()
- : in_round(false),
- is_initialized(false),
- usage_overage_at_round(-1),
- diskspace_shortage_at_round(-1),
- usage_on_beginning_of_round(-1),
- usage_on_end_of_round(-1),
- num_evicted_origins_in_round(0) {
- }
+ EvictionRoundStatistics();
bool in_round;
bool is_initialized;
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 5ee9f2b..24511e3 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -118,6 +118,11 @@ std::vector<std::string> TestShell::js_flags_;
bool TestShell::accelerated_2d_canvas_enabled_ = false;
bool TestShell::accelerated_compositing_enabled_ = false;
+TestShell::TestParams::TestParams()
+ : dump_tree(true),
+ dump_pixels(false) {
+}
+
TestShell::TestShell()
: m_mainWnd(NULL),
m_editWnd(NULL),
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index 5097b3d..f978491 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -48,8 +48,7 @@ class TestShell : public base::SupportsWeakPtr<TestShell> {
public:
struct TestParams {
// Load the test defaults.
- TestParams() : dump_tree(true), dump_pixels(false) {
- }
+ TestParams();
// The kind of output we want from this test.
bool dump_tree;