summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 22:54:58 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 22:54:58 +0000
commitd4799a3bf70ecc62ab702150cae1d1e925b14938 (patch)
treefae21bc09ddaa68dfc709e0d6abc55a43fe99333 /app
parent7176ef1c7ada2da66a47ed38987c92a06f3bfb4a (diff)
downloadchromium_src-d4799a3bf70ecc62ab702150cae1d1e925b14938.zip
chromium_src-d4799a3bf70ecc62ab702150cae1d1e925b14938.tar.gz
chromium_src-d4799a3bf70ecc62ab702150cae1d1e925b14938.tar.bz2
FBTF: Moves code to the headers.
One of the big things is starting to move/declare ctors/dtors that derive from RefCounted<> to/in the implementation file. (Saves 4 megabytes from libglue.a alone. 1 meg off libbrowser.a. Hundred of kilobyte savings in a large number of .a files; only libmedia.a grew and it's only 100k.) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3452030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/active_window_watcher_x.cc3
-rw-r--r--app/active_window_watcher_x.h1
-rw-r--r--app/resource_bundle.cc3
-rw-r--r--app/resource_bundle.h1
-rw-r--r--app/sql/connection.cc6
-rw-r--r--app/sql/connection.h4
-rw-r--r--app/text_elider.cc6
-rw-r--r--app/text_elider.h3
8 files changed, 25 insertions, 2 deletions
diff --git a/app/active_window_watcher_x.cc b/app/active_window_watcher_x.cc
index 04cb3d0..9b861e6 100644
--- a/app/active_window_watcher_x.cc
+++ b/app/active_window_watcher_x.cc
@@ -24,6 +24,9 @@ ActiveWindowWatcherX::ActiveWindowWatcherX() {
Init();
}
+ActiveWindowWatcherX::~ActiveWindowWatcherX() {
+}
+
void ActiveWindowWatcherX::Init() {
GdkAtom kNetActiveWindow = gdk_atom_intern("_NET_ACTIVE_WINDOW", FALSE);
kNetActiveWindowAtom = gdk_x11_atom_to_xatom_for_display(
diff --git a/app/active_window_watcher_x.h b/app/active_window_watcher_x.h
index e2612ec..e93ea1c 100644
--- a/app/active_window_watcher_x.h
+++ b/app/active_window_watcher_x.h
@@ -33,6 +33,7 @@ class ActiveWindowWatcherX {
friend struct DefaultSingletonTraits<ActiveWindowWatcherX>;
ActiveWindowWatcherX();
+ ~ActiveWindowWatcherX();
void Init();
diff --git a/app/resource_bundle.cc b/app/resource_bundle.cc
index 4b97c90..ec28581 100644
--- a/app/resource_bundle.cc
+++ b/app/resource_bundle.cc
@@ -214,6 +214,9 @@ ResourceBundle::LoadedDataPack::LoadedDataPack(const FilePath& path)
Load();
}
+ResourceBundle::LoadedDataPack::~LoadedDataPack() {
+}
+
void ResourceBundle::LoadedDataPack::Load() {
DCHECK(!data_pack_.get());
data_pack_.reset(new base::DataPack);
diff --git a/app/resource_bundle.h b/app/resource_bundle.h
index 49ca359..44237e2 100644
--- a/app/resource_bundle.h
+++ b/app/resource_bundle.h
@@ -161,6 +161,7 @@ class ResourceBundle {
class LoadedDataPack {
public:
explicit LoadedDataPack(const FilePath& path);
+ ~LoadedDataPack();
bool GetStringPiece(int resource_id, base::StringPiece* data) const;
RefCountedStaticMemory* GetStaticMemory(int resource_id) const;
diff --git a/app/sql/connection.cc b/app/sql/connection.cc
index b52655a..6691252 100644
--- a/app/sql/connection.cc
+++ b/app/sql/connection.cc
@@ -49,6 +49,12 @@ bool StatementID::operator<(const StatementID& other) const {
return strcmp(str_, other.str_) < 0;
}
+ErrorDelegate::ErrorDelegate() {
+}
+
+ErrorDelegate::~ErrorDelegate() {
+}
+
Connection::StatementRef::StatementRef()
: connection_(NULL),
stmt_(NULL) {
diff --git a/app/sql/connection.h b/app/sql/connection.h
index 680cf1d..0b685cc 100644
--- a/app/sql/connection.h
+++ b/app/sql/connection.h
@@ -78,6 +78,8 @@ class Connection;
// corruption, low-level IO errors or locking violations.
class ErrorDelegate : public base::RefCounted<ErrorDelegate> {
public:
+ ErrorDelegate();
+
// |error| is an sqlite result code as seen in sqlite\preprocessed\sqlite3.h
// |connection| is db connection where the error happened and |stmt| is
// our best guess at the statement that triggered the error. Do not store
@@ -94,7 +96,7 @@ class ErrorDelegate : public base::RefCounted<ErrorDelegate> {
protected:
friend class base::RefCounted<ErrorDelegate>;
- virtual ~ErrorDelegate() {}
+ virtual ~ErrorDelegate();
};
class Connection {
diff --git a/app/text_elider.cc b/app/text_elider.cc
index 5a4d9d0..ec44057 100644
--- a/app/text_elider.cc
+++ b/app/text_elider.cc
@@ -396,6 +396,12 @@ SortedDisplayURL::SortedDisplayURL(const GURL& url,
}
}
+SortedDisplayURL::SortedDisplayURL() {
+}
+
+SortedDisplayURL::~SortedDisplayURL() {
+}
+
int SortedDisplayURL::Compare(const SortedDisplayURL& other,
icu::Collator* collator) const {
// Compare on hosts first. The host won't contain 'www.'.
diff --git a/app/text_elider.h b/app/text_elider.h
index d2a6a73..06ebbf0 100644
--- a/app/text_elider.h
+++ b/app/text_elider.h
@@ -63,7 +63,8 @@ std::wstring ElideFilename(const FilePath& filename,
class SortedDisplayURL {
public:
SortedDisplayURL(const GURL& url, const std::wstring& languages);
- SortedDisplayURL() {}
+ SortedDisplayURL();
+ ~SortedDisplayURL();
// Compares this SortedDisplayURL to |url| using |collator|. Returns a value
// < 0, = 1 or > 0 as to whether this url is less then, equal to or greater