diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 17:22:49 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-16 17:22:49 +0000 |
commit | 201366472a1a679a3894d152322416ea90a81c58 (patch) | |
tree | 092a3f6668c417a2b4b68b1fd29d2fd41dbc7fad /base | |
parent | 8b4986943d904a9a23cfd612dcacf6e1cc3266a1 (diff) | |
download | chromium_src-201366472a1a679a3894d152322416ea90a81c58.zip chromium_src-201366472a1a679a3894d152322416ea90a81c58.tar.gz chromium_src-201366472a1a679a3894d152322416ea90a81c58.tar.bz2 |
Remove more definitions from header files.
This patch only concerns itself with places where we have more than 100 copies of methods being generated. (For example, the destructor and other random methods in FilePath weren't being inlined, leading to several hundred copies being generated.)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3039001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/file_path.cc | 17 | ||||
-rw-r--r-- | base/file_path.h | 13 | ||||
-rw-r--r-- | base/weak_ptr.cc | 6 | ||||
-rw-r--r-- | base/weak_ptr.h | 2 |
4 files changed, 30 insertions, 8 deletions
diff --git a/base/file_path.cc b/base/file_path.cc index 0706a08..1787a69 100644 --- a/base/file_path.cc +++ b/base/file_path.cc @@ -109,6 +109,23 @@ bool AreAllSeparators(const FilePath::StringType& input) { } // namespace +FilePath::FilePath() { +} + +FilePath::FilePath(const FilePath& that) : path_(that.path_) { +} + +FilePath::FilePath(const StringType& path) : path_(path) { +} + +FilePath::~FilePath() { +} + +FilePath& FilePath::operator=(const FilePath& that) { + path_ = that.path_; + return *this; +} + bool FilePath::IsSeparator(CharType character) { for (size_t i = 0; i < arraysize(kSeparators) - 1; ++i) { if (character == kSeparators[i]) { diff --git a/base/file_path.h b/base/file_path.h index 46a3060..6484c5a 100644 --- a/base/file_path.h +++ b/base/file_path.h @@ -150,14 +150,11 @@ class FilePath { // The character used to identify a file extension. static const CharType kExtensionSeparator; - FilePath() {} - FilePath(const FilePath& that) : path_(that.path_) {} - explicit FilePath(const StringType& path) : path_(path) {} - - FilePath& operator=(const FilePath& that) { - path_ = that.path_; - return *this; - } + FilePath(); + FilePath(const FilePath& that); + explicit FilePath(const StringType& path); + ~FilePath(); + FilePath& operator=(const FilePath& that); bool operator==(const FilePath& that) const; diff --git a/base/weak_ptr.cc b/base/weak_ptr.cc index 2c8f5aa..dec6a65 100644 --- a/base/weak_ptr.cc +++ b/base/weak_ptr.cc @@ -31,6 +31,9 @@ WeakReference::WeakReference() { WeakReference::WeakReference(Flag* flag) : flag_(flag) { } +WeakReference::~WeakReference() { +} + bool WeakReference::is_valid() const { return flag_ && flag_->is_valid(); } @@ -61,5 +64,8 @@ WeakPtrBase::WeakPtrBase() { WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) { } +WeakPtrBase::~WeakPtrBase() { +} + } // namespace internal } // namespace base diff --git a/base/weak_ptr.h b/base/weak_ptr.h index 85a26d16..6dbc9e2 100644 --- a/base/weak_ptr.h +++ b/base/weak_ptr.h @@ -79,6 +79,7 @@ class WeakReference { WeakReference(); WeakReference(Flag* flag); + ~WeakReference(); bool is_valid() const; @@ -110,6 +111,7 @@ class WeakReferenceOwner { class WeakPtrBase { public: WeakPtrBase(); + ~WeakPtrBase(); protected: WeakPtrBase(const WeakReference& ref); |