diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 16:57:03 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 16:57:03 +0000 |
commit | 8e38341c65360b48c32b88c58d6ac490516c0c0c (patch) | |
tree | 381bfdd42b59c1c4fa2368dec5ed479d83ab6f16 | |
parent | 0b97feeb41cb115158741daa975ec95d2e10cace (diff) | |
download | chromium_src-8e38341c65360b48c32b88c58d6ac490516c0c0c.zip chromium_src-8e38341c65360b48c32b88c58d6ac490516c0c0c.tar.gz chromium_src-8e38341c65360b48c32b88c58d6ac490516c0c0c.tar.bz2 |
FBTF: Even more ctor/virtual deinlining.
(Only 424k off Linux debug .a files).
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3859003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63059 0039d316-1c4b-4281-b951-d872f2087c98
114 files changed, 482 insertions, 198 deletions
diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc index 851c8ef..ba8c63d 100644 --- a/chrome/browser/autofill/autofill_download.cc +++ b/chrome/browser/autofill/autofill_download.cc @@ -25,6 +25,11 @@ #define AUTO_FILL_QUERY_SERVER_NAME_START_IN_HEADER "SOMESERVER/" #endif +struct AutoFillDownloadManager::FormRequestData { + std::vector<std::string> form_signatures; + AutoFillRequestType request_type; +}; + AutoFillDownloadManager::AutoFillDownloadManager(Profile* profile) : profile_(profile), observer_(NULL), diff --git a/chrome/browser/autofill/autofill_download.h b/chrome/browser/autofill/autofill_download.h index c2f0ba0..3b972a1 100644 --- a/chrome/browser/autofill/autofill_download.h +++ b/chrome/browser/autofill/autofill_download.h @@ -7,7 +7,6 @@ #pragma once #include <map> -#include <vector> #include <string> #include "base/scoped_vector.h" @@ -92,10 +91,8 @@ class AutoFillDownloadManager : public URLFetcher::Delegate { private: friend class AutoFillDownloadTestHelper; // unit-test. - struct FormRequestData { - std::vector<std::string> form_signatures; - AutoFillRequestType request_type; - }; + + struct FormRequestData; // Initiates request to AutoFill servers to download/upload heuristics. // |form_xml| - form structure XML to upload/download. diff --git a/chrome/browser/autofill/contact_info.cc b/chrome/browser/autofill/contact_info.cc index f38f049..ce2e36e 100644 --- a/chrome/browser/autofill/contact_info.cc +++ b/chrome/browser/autofill/contact_info.cc @@ -23,6 +23,10 @@ static const AutoFillFieldType kAutoFillContactInfoTypes[] = { static const size_t kAutoFillContactInfoLength = arraysize(kAutoFillContactInfoTypes); +ContactInfo::ContactInfo() {} + +ContactInfo::~ContactInfo() {} + FormGroup* ContactInfo::Clone() const { return new ContactInfo(*this); } diff --git a/chrome/browser/autofill/contact_info.h b/chrome/browser/autofill/contact_info.h index 97c3119..d47ec8d 100644 --- a/chrome/browser/autofill/contact_info.h +++ b/chrome/browser/autofill/contact_info.h @@ -16,7 +16,8 @@ typedef std::vector<string16> NameTokens; // A form group that stores contact information. class ContactInfo : public FormGroup { public: - ContactInfo() {} + ContactInfo(); + virtual ~ContactInfo(); // FormGroup implementation: virtual FormGroup* Clone() const; diff --git a/chrome/browser/autofill/form_group.cc b/chrome/browser/autofill/form_group.cc index 83f3147f..e99059b 100644 --- a/chrome/browser/autofill/form_group.cc +++ b/chrome/browser/autofill/form_group.cc @@ -4,6 +4,12 @@ #include "chrome/browser/autofill/form_group.h" +string16 FormGroup::GetPreviewText(const AutoFillType& type) const { + return GetFieldText(type); +} + +const string16& FormGroup::Label() const { return EmptyString16(); } + bool FormGroup::operator!=(const FormGroup& form_group) const { FieldTypeSet a, b, symmetric_difference; GetAvailableFieldTypes(&a); diff --git a/chrome/browser/autofill/form_group.h b/chrome/browser/autofill/form_group.h index 4a61c1a..68a7d3a 100644 --- a/chrome/browser/autofill/form_group.h +++ b/chrome/browser/autofill/form_group.h @@ -38,9 +38,7 @@ class FormGroup { virtual string16 GetFieldText(const AutoFillType& type) const = 0; // Returns the text for preview. - virtual string16 GetPreviewText(const AutoFillType& type) const { - return GetFieldText(type); - } + virtual string16 GetPreviewText(const AutoFillType& type) const; // Used to determine if the text being typed into a field matches the // information in this FormGroup object. This is used by the preview @@ -55,7 +53,7 @@ class FormGroup { // Returns the label for this FormGroup item. This should be overridden for // form group items that implement a label. - virtual const string16& Label() const { return EmptyString16(); } + virtual const string16& Label() const; // Returns true if the field data in |form_group| does not match the field // data in this FormGroup. diff --git a/chrome/browser/autofill/phone_number.cc b/chrome/browser/autofill/phone_number.cc index 997edd9..025f031 100644 --- a/chrome/browser/autofill/phone_number.cc +++ b/chrome/browser/autofill/phone_number.cc @@ -32,6 +32,10 @@ const int kAutoFillPhoneLength = arraysize(kAutoFillPhoneTypes); } // namespace +PhoneNumber::PhoneNumber() {} + +PhoneNumber::~PhoneNumber() {} + void PhoneNumber::GetPossibleFieldTypes(const string16& text, FieldTypeSet* possible_types) const { string16 stripped_text(text); diff --git a/chrome/browser/autofill/phone_number.h b/chrome/browser/autofill/phone_number.h index ef1bafc..1167683 100644 --- a/chrome/browser/autofill/phone_number.h +++ b/chrome/browser/autofill/phone_number.h @@ -14,8 +14,8 @@ // A form group that stores phone number information. class PhoneNumber : public FormGroup { public: - PhoneNumber() {} - virtual ~PhoneNumber() {} + PhoneNumber(); + virtual ~PhoneNumber(); // FormGroup implementation: virtual FormGroup* Clone() const = 0; diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index d836bee..b98d78c 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -973,6 +973,8 @@ MetricEventDurationObserver::MetricEventDurationObserver() { NotificationService::AllSources()); } +MetricEventDurationObserver::~MetricEventDurationObserver() {} + int MetricEventDurationObserver::GetEventDurationMs( const std::string& event_name) { EventDurationMap::const_iterator it = durations_.find(event_name); @@ -1002,6 +1004,8 @@ PageTranslatedObserver::PageTranslatedObserver(AutomationProvider* automation, Source<TabContents>(tab_contents)); } +PageTranslatedObserver::~PageTranslatedObserver() {} + void PageTranslatedObserver::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index 8706d85..5c7b77b 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -508,6 +508,7 @@ class DocumentPrintedNotificationObserver : public NotificationObserver { class MetricEventDurationObserver : public NotificationObserver { public: MetricEventDurationObserver(); + virtual ~MetricEventDurationObserver(); // Get the duration of an event. Returns -1 if we haven't seen the event. int GetEventDurationMs(const std::string& event_name); @@ -530,6 +531,7 @@ class PageTranslatedObserver : public NotificationObserver { PageTranslatedObserver(AutomationProvider* automation, IPC::Message* reply_message, TabContents* tab_contents); + virtual ~PageTranslatedObserver(); // NotificationObserver interface. virtual void Observe(NotificationType type, diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc index abdf099..9cb0ecd3 100644 --- a/chrome/browser/automation/automation_resource_message_filter.cc +++ b/chrome/browser/automation/automation_resource_message_filter.cc @@ -82,6 +82,10 @@ class AutomationCookieStore : public net::CookieStore { DISALLOW_COPY_AND_ASSIGN(AutomationCookieStore); }; +struct AutomationResourceMessageFilter::CookieCompletionInfo { + net::CompletionCallback* completion_callback; + scoped_refptr<net::CookieStore> cookie_store; +}; AutomationResourceMessageFilter::AutomationResourceMessageFilter() : channel_(NULL) { diff --git a/chrome/browser/automation/automation_resource_message_filter.h b/chrome/browser/automation/automation_resource_message_filter.h index c245f280..a30825f 100644 --- a/chrome/browser/automation/automation_resource_message_filter.h +++ b/chrome/browser/automation/automation_resource_message_filter.h @@ -203,10 +203,7 @@ class AutomationResourceMessageFilter // Contains information used for completing the request to read cookies from // the host coming in from the renderer. - struct CookieCompletionInfo { - net::CompletionCallback* completion_callback; - scoped_refptr<net::CookieStore> cookie_store; - }; + struct CookieCompletionInfo; // Map of completion callback id to CookieCompletionInfo, which contains the // actual callback which is invoked on successful retrieval of cookies from diff --git a/chrome/browser/blocked_content_container.cc b/chrome/browser/blocked_content_container.cc index 58897c4..640e505 100644 --- a/chrome/browser/blocked_content_container.cc +++ b/chrome/browser/blocked_content_container.cc @@ -31,6 +31,8 @@ BlockedContentContainer::BlockedContentContainer(TabContents* owner) : owner_(owner) { } +BlockedContentContainer::~BlockedContentContainer() {} + void BlockedContentContainer::AddTabContents(TabContents* tab_contents, WindowOpenDisposition disposition, const gfx::Rect& bounds, diff --git a/chrome/browser/blocked_content_container.h b/chrome/browser/blocked_content_container.h index 29fc467..714af7ce0 100644 --- a/chrome/browser/blocked_content_container.h +++ b/chrome/browser/blocked_content_container.h @@ -20,6 +20,7 @@ class BlockedContentContainer : public TabContentsDelegate { public: // Creates a container for a certain TabContents: explicit BlockedContentContainer(TabContents* owner); + virtual ~BlockedContentContainer(); // Adds a TabContents to this container. |bounds| are the window bounds // requested for the TabContents. diff --git a/chrome/browser/bookmarks/bookmark_codec.cc b/chrome/browser/bookmarks/bookmark_codec.cc index a4f0461..9b5be0f 100644 --- a/chrome/browser/bookmarks/bookmark_codec.cc +++ b/chrome/browser/bookmarks/bookmark_codec.cc @@ -40,6 +40,8 @@ BookmarkCodec::BookmarkCodec() maximum_id_(0) { } +BookmarkCodec::~BookmarkCodec() {} + Value* BookmarkCodec::Encode(BookmarkModel* model) { return Encode(model->GetBookmarkBarNode(), model->other_node()); } diff --git a/chrome/browser/bookmarks/bookmark_codec.h b/chrome/browser/bookmarks/bookmark_codec.h index 94c9213..fe57d1f 100644 --- a/chrome/browser/bookmarks/bookmark_codec.h +++ b/chrome/browser/bookmarks/bookmark_codec.h @@ -33,6 +33,7 @@ class BookmarkCodec { // guarantees on how the IDs are reassigned or about doing minimal // reassignments to achieve uniqueness. BookmarkCodec(); + ~BookmarkCodec(); // Encodes the model to a JSON value. It's up to the caller to delete the // returned object. This is invoked to encode the contents of the bookmark bar diff --git a/chrome/browser/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/bookmarks/recently_used_folders_combo_model.cc index e6309f4..7990de6 100644 --- a/chrome/browser/bookmarks/recently_used_folders_combo_model.cc +++ b/chrome/browser/bookmarks/recently_used_folders_combo_model.cc @@ -49,6 +49,8 @@ RecentlyUsedFoldersComboModel::RecentlyUsedFoldersComboModel( node_parent_index_ = static_cast<int>(it - nodes_.begin()); } +RecentlyUsedFoldersComboModel::~RecentlyUsedFoldersComboModel() {} + int RecentlyUsedFoldersComboModel::GetItemCount() { return static_cast<int>(nodes_.size() + 1); } diff --git a/chrome/browser/bookmarks/recently_used_folders_combo_model.h b/chrome/browser/bookmarks/recently_used_folders_combo_model.h index adf36a9..e8fcc75 100644 --- a/chrome/browser/bookmarks/recently_used_folders_combo_model.h +++ b/chrome/browser/bookmarks/recently_used_folders_combo_model.h @@ -18,6 +18,7 @@ class RecentlyUsedFoldersComboModel : public ComboboxModel { public: RecentlyUsedFoldersComboModel(BookmarkModel* model, const BookmarkNode* node); + virtual ~RecentlyUsedFoldersComboModel(); // Overridden from ComboboxModel: virtual int GetItemCount(); diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc index 9c31138..18331b1 100644 --- a/chrome/browser/browsing_data_appcache_helper.cc +++ b/chrome/browser/browsing_data_appcache_helper.cc @@ -61,6 +61,8 @@ void BrowsingDataAppCacheHelper::DeleteAppCacheGroup( GetAppCacheService()->DeleteAppCacheGroup(manifest_url, NULL); } +BrowsingDataAppCacheHelper::~BrowsingDataAppCacheHelper() {} + void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) { if (BrowserThread::CurrentlyOn(BrowserThread::IO)) { // Filter out appache info entries for extensions. Extension state is not @@ -136,3 +138,5 @@ void CannedBrowsingDataAppCacheHelper::StartFetching( completion_callback->Run(); delete completion_callback; } + +CannedBrowsingDataAppCacheHelper::~CannedBrowsingDataAppCacheHelper() {} diff --git a/chrome/browser/browsing_data_appcache_helper.h b/chrome/browser/browsing_data_appcache_helper.h index 58d92af..b54b511 100644 --- a/chrome/browser/browsing_data_appcache_helper.h +++ b/chrome/browser/browsing_data_appcache_helper.h @@ -32,7 +32,7 @@ class BrowsingDataAppCacheHelper protected: friend class base::RefCountedThreadSafe<BrowsingDataAppCacheHelper>; - virtual ~BrowsingDataAppCacheHelper() {} + virtual ~BrowsingDataAppCacheHelper(); scoped_ptr<Callback0::Type> completion_callback_; scoped_refptr<appcache::AppCacheInfoCollection> info_collection_; @@ -71,7 +71,7 @@ class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper { virtual void CancelNotification() {} private: - virtual ~CannedBrowsingDataAppCacheHelper() {} + virtual ~CannedBrowsingDataAppCacheHelper(); DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper); }; diff --git a/chrome/browser/browsing_data_indexed_db_helper.cc b/chrome/browser/browsing_data_indexed_db_helper.cc index 830e299..0ecdc2e 100644 --- a/chrome/browser/browsing_data_indexed_db_helper.cc +++ b/chrome/browser/browsing_data_indexed_db_helper.cc @@ -215,3 +215,5 @@ void CannedBrowsingDataIndexedDBHelper::StartFetching( callback->Run(indexed_db_info_); delete callback; } + +CannedBrowsingDataIndexedDBHelper::~CannedBrowsingDataIndexedDBHelper() {} diff --git a/chrome/browser/browsing_data_indexed_db_helper.h b/chrome/browser/browsing_data_indexed_db_helper.h index c3704ec..11a9755 100644 --- a/chrome/browser/browsing_data_indexed_db_helper.h +++ b/chrome/browser/browsing_data_indexed_db_helper.h @@ -113,7 +113,7 @@ class CannedBrowsingDataIndexedDBHelper virtual void DeleteIndexedDBFile(const FilePath& file_path) {} private: - virtual ~CannedBrowsingDataIndexedDBHelper() {} + virtual ~CannedBrowsingDataIndexedDBHelper(); Profile* profile_; diff --git a/chrome/browser/dom_ui/dom_ui_screenshot_source.cc b/chrome/browser/dom_ui/dom_ui_screenshot_source.cc index 8913fd7..db35499 100644 --- a/chrome/browser/dom_ui/dom_ui_screenshot_source.cc +++ b/chrome/browser/dom_ui/dom_ui_screenshot_source.cc @@ -108,6 +108,8 @@ DOMUIScreenshotSource::DOMUIScreenshotSource( current_screenshot_.clear(); } +DOMUIScreenshotSource::~DOMUIScreenshotSource() {} + void DOMUIScreenshotSource::StartDataRequest(const std::string& path, bool is_off_the_record, int request_id) { diff --git a/chrome/browser/dom_ui/dom_ui_screenshot_source.h b/chrome/browser/dom_ui/dom_ui_screenshot_source.h index be4e280..8cd8b2c 100644 --- a/chrome/browser/dom_ui/dom_ui_screenshot_source.h +++ b/chrome/browser/dom_ui/dom_ui_screenshot_source.h @@ -36,7 +36,7 @@ class DOMUIScreenshotSource : public ChromeURLDataManager::DataSource { std::vector<unsigned char> GetScreenshot(const std::string& path); private: - ~DOMUIScreenshotSource() {} + virtual ~DOMUIScreenshotSource(); // scoped_refptr<RefCountedBytes> current_screenshot_; std::vector<unsigned char> current_screenshot_; diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc index a1b8bf0..dca2917 100644 --- a/chrome/browser/dom_ui/ntp_resource_cache.cc +++ b/chrome/browser/dom_ui/ntp_resource_cache.cc @@ -140,6 +140,8 @@ NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) { pref_change_registrar_.Add(prefs::kNTPShownSections, this); } +NTPResourceCache::~NTPResourceCache() {} + RefCountedBytes* NTPResourceCache::GetNewTabHTML(bool is_off_the_record) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (is_off_the_record) { diff --git a/chrome/browser/dom_ui/ntp_resource_cache.h b/chrome/browser/dom_ui/ntp_resource_cache.h index 3cdc3e5..b4d10b6 100644 --- a/chrome/browser/dom_ui/ntp_resource_cache.h +++ b/chrome/browser/dom_ui/ntp_resource_cache.h @@ -20,7 +20,7 @@ class RefCountedBytes; class NTPResourceCache : public NotificationObserver { public: explicit NTPResourceCache(Profile* profile); - virtual ~NTPResourceCache() {} + virtual ~NTPResourceCache(); RefCountedBytes* GetNewTabHTML(bool is_off_the_record); RefCountedBytes* GetNewTabCSS(bool is_off_the_record); diff --git a/chrome/browser/dom_ui/options/core_options_handler.cc b/chrome/browser/dom_ui/options/core_options_handler.cc index 520c57bd..aabd3f4 100644 --- a/chrome/browser/dom_ui/options/core_options_handler.cc +++ b/chrome/browser/dom_ui/options/core_options_handler.cc @@ -20,8 +20,9 @@ #include "grit/locale_settings.h" #include "grit/theme_resources.h" -CoreOptionsHandler::CoreOptionsHandler() { -} +CoreOptionsHandler::CoreOptionsHandler() {} + +CoreOptionsHandler::~CoreOptionsHandler() {} void CoreOptionsHandler::GetLocalizedValues( DictionaryValue* localized_strings) { diff --git a/chrome/browser/dom_ui/options/core_options_handler.h b/chrome/browser/dom_ui/options/core_options_handler.h index 85618e2..7860525 100644 --- a/chrome/browser/dom_ui/options/core_options_handler.h +++ b/chrome/browser/dom_ui/options/core_options_handler.h @@ -18,6 +18,7 @@ class CoreOptionsHandler : public OptionsPageUIHandler { public: CoreOptionsHandler(); + virtual ~CoreOptionsHandler(); // OptionsUIHandler implementation. virtual void GetLocalizedValues(DictionaryValue* localized_strings); diff --git a/chrome/browser/dom_ui/options/options_managed_banner_handler.cc b/chrome/browser/dom_ui/options/options_managed_banner_handler.cc index 2f802f4..7be5bf9 100644 --- a/chrome/browser/dom_ui/options/options_managed_banner_handler.cc +++ b/chrome/browser/dom_ui/options/options_managed_banner_handler.cc @@ -17,6 +17,8 @@ OptionsManagedBannerHandler::OptionsManagedBannerHandler( SetupBannerVisibilty(); } +OptionsManagedBannerHandler::~OptionsManagedBannerHandler() {} + void OptionsManagedBannerHandler::OnUpdateVisibility() { // A preference that may be managed has changed. Update our visibility // state. diff --git a/chrome/browser/dom_ui/options/options_managed_banner_handler.h b/chrome/browser/dom_ui/options/options_managed_banner_handler.h index b03bed2..6c63484 100644 --- a/chrome/browser/dom_ui/options/options_managed_banner_handler.h +++ b/chrome/browser/dom_ui/options/options_managed_banner_handler.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_DOM_UI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_ #pragma once +#include "base/string16.h" #include "chrome/browser/policy/managed_prefs_banner_base.h" #include "chrome/browser/options_window.h" @@ -18,7 +19,7 @@ class OptionsManagedBannerHandler : public policy::ManagedPrefsBannerBase { public: OptionsManagedBannerHandler(DOMUI* dom_ui, const string16& page_name, OptionsPage page); - virtual ~OptionsManagedBannerHandler() { } + virtual ~OptionsManagedBannerHandler(); protected: // ManagedPrefsBannerBase implementation. diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc index 4d4cc48..3b79465 100644 --- a/chrome/browser/dom_ui/options/options_ui.cc +++ b/chrome/browser/dom_ui/options/options_ui.cc @@ -85,6 +85,8 @@ OptionsUIHTMLSource::OptionsUIHTMLSource(DictionaryValue* localized_strings) localized_strings_.reset(localized_strings); } +OptionsUIHTMLSource::~OptionsUIHTMLSource() {} + void OptionsUIHTMLSource::StartDataRequest(const std::string& path, bool is_off_the_record, int request_id) { @@ -103,6 +105,10 @@ void OptionsUIHTMLSource::StartDataRequest(const std::string& path, SendResponse(request_id, html_bytes); } +std::string OptionsUIHTMLSource::GetMimeType(const std::string&) const { + return "text/html"; +} + //////////////////////////////////////////////////////////////////////////////// // // OptionsPageUIHandler diff --git a/chrome/browser/dom_ui/options/options_ui.h b/chrome/browser/dom_ui/options/options_ui.h index 4f9bf6c..fafe972 100644 --- a/chrome/browser/dom_ui/options/options_ui.h +++ b/chrome/browser/dom_ui/options/options_ui.h @@ -23,16 +23,14 @@ class OptionsUIHTMLSource : public ChromeURLDataManager::DataSource { public: // The constructor takes over ownership of |localized_strings|. explicit OptionsUIHTMLSource(DictionaryValue* localized_strings); - virtual ~OptionsUIHTMLSource() {} + virtual ~OptionsUIHTMLSource(); // Called when the network layer has requested a resource underneath // the path we registered. virtual void StartDataRequest(const std::string& path, bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string&) const { - return "text/html"; - } + virtual std::string GetMimeType(const std::string&) const; private: // Localized strings collection. diff --git a/chrome/browser/download/drag_download_util.cc b/chrome/browser/download/drag_download_util.cc index f493ab1..72804e5 100644 --- a/chrome/browser/download/drag_download_util.cc +++ b/chrome/browser/download/drag_download_util.cc @@ -86,6 +86,13 @@ FileStream* CreateFileStreamForDrop(FilePath* file_path) { return NULL; } +PromiseFileFinalizer::PromiseFileFinalizer( + DragDownloadFile* drag_file_downloader) + : drag_file_downloader_(drag_file_downloader) { +} + +PromiseFileFinalizer::~PromiseFileFinalizer() {} + void PromiseFileFinalizer::Cleanup() { if (drag_file_downloader_.get()) drag_file_downloader_ = NULL; diff --git a/chrome/browser/download/drag_download_util.h b/chrome/browser/download/drag_download_util.h index bd9d44a..31bda47 100644 --- a/chrome/browser/download/drag_download_util.h +++ b/chrome/browser/download/drag_download_util.h @@ -42,10 +42,8 @@ net::FileStream* CreateFileStreamForDrop(FilePath* file_path); // Implementation of DownloadFileObserver to finalize the download process. class PromiseFileFinalizer : public DownloadFileObserver { public: - explicit PromiseFileFinalizer(DragDownloadFile* drag_file_downloader) - : drag_file_downloader_(drag_file_downloader) { - } - virtual ~PromiseFileFinalizer() { } + explicit PromiseFileFinalizer(DragDownloadFile* drag_file_downloader); + virtual ~PromiseFileFinalizer(); // DownloadFileObserver methods. virtual void OnDownloadCompleted(const FilePath& file_path); diff --git a/chrome/browser/extensions/extension_accessibility_api.cc b/chrome/browser/extensions/extension_accessibility_api.cc index 3a24759..4c60b5e 100644 --- a/chrome/browser/extensions/extension_accessibility_api.cc +++ b/chrome/browser/extensions/extension_accessibility_api.cc @@ -40,6 +40,9 @@ ExtensionAccessibilityEventRouter* return Singleton<ExtensionAccessibilityEventRouter>::get(); } +ExtensionAccessibilityEventRouter::ExtensionAccessibilityEventRouter() + : enabled_(false) {} + ExtensionAccessibilityEventRouter::~ExtensionAccessibilityEventRouter() { STLDeleteElements(&on_enabled_listeners_); STLDeleteElements(&on_disabled_listeners_); diff --git a/chrome/browser/extensions/extension_accessibility_api.h b/chrome/browser/extensions/extension_accessibility_api.h index 87f94d7..749dc7e 100644 --- a/chrome/browser/extensions/extension_accessibility_api.h +++ b/chrome/browser/extensions/extension_accessibility_api.h @@ -47,8 +47,7 @@ class ExtensionAccessibilityEventRouter : public NotificationObserver { private: friend struct DefaultSingletonTraits<ExtensionAccessibilityEventRouter>; - ExtensionAccessibilityEventRouter() - : enabled_(false) {} + ExtensionAccessibilityEventRouter(); virtual ~ExtensionAccessibilityEventRouter(); // NotificationObserver::Observe. diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc index 791b4f9..f805a1e 100644 --- a/chrome/browser/extensions/extension_bookmarks_module.cc +++ b/chrome/browser/extensions/extension_bookmarks_module.cc @@ -762,6 +762,10 @@ void CreateBookmarkFunction::GetQuotaLimitHeuristics( BookmarksQuotaLimitFactory::BuildForCreate(heuristics, profile()); } +BookmarksIOFunction::BookmarksIOFunction() {} + +BookmarksIOFunction::~BookmarksIOFunction() {} + void BookmarksIOFunction::SelectFile(SelectFileDialog::Type type) { // Balanced in one of the three callbacks of SelectFileDialog: // either FileSelectionCanceled, MultiFilesSelected, or FileSelected diff --git a/chrome/browser/extensions/extension_bookmarks_module.h b/chrome/browser/extensions/extension_bookmarks_module.h index 27c2111..e8e91a1 100644 --- a/chrome/browser/extensions/extension_bookmarks_module.h +++ b/chrome/browser/extensions/extension_bookmarks_module.h @@ -174,6 +174,9 @@ class UpdateBookmarkFunction : public BookmarksFunction { class BookmarksIOFunction : public BookmarksFunction, public SelectFileDialog::Listener { public: + BookmarksIOFunction(); + virtual ~BookmarksIOFunction(); + // Overridden from SelectFileDialog::Listener: virtual void FileSelected(const FilePath& path, int index, void* params) = 0; void MultiFilesSelected(const std::vector<FilePath>& files, void* params); diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc index ed37fa9..b9ef775 100644 --- a/chrome/browser/extensions/extension_browser_event_router.cc +++ b/chrome/browser/extensions/extension_browser_event_router.cc @@ -137,6 +137,8 @@ ExtensionBrowserEventRouter::ExtensionBrowserEventRouter() focused_window_id_(extension_misc::kUnknownWindowId), profile_(NULL) { } +ExtensionBrowserEventRouter::~ExtensionBrowserEventRouter() {} + void ExtensionBrowserEventRouter::OnBrowserAdded(const Browser* browser) { RegisterForBrowserNotifications(browser); } diff --git a/chrome/browser/extensions/extension_browser_event_router.h b/chrome/browser/extensions/extension_browser_event_router.h index 7cd2f99..bfd2205 100644 --- a/chrome/browser/extensions/extension_browser_event_router.h +++ b/chrome/browser/extensions/extension_browser_event_router.h @@ -122,6 +122,7 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver, void UnregisterForTabNotifications(TabContents* contents); ExtensionBrowserEventRouter(); + ~ExtensionBrowserEventRouter(); friend struct DefaultSingletonTraits<ExtensionBrowserEventRouter>; NotificationRegistrar registrar_; diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc index 554c005..08f3b45 100644 --- a/chrome/browser/extensions/extension_dom_ui.cc +++ b/chrome/browser/extensions/extension_dom_ui.cc @@ -146,6 +146,8 @@ ExtensionDOMUI::ExtensionDOMUI(TabContents* tab_contents, GURL url) } } +ExtensionDOMUI::~ExtensionDOMUI() {} + void ExtensionDOMUI::ResetExtensionFunctionDispatcher( RenderViewHost* render_view_host) { // Use the NavigationController to get the URL rather than the TabContents @@ -189,10 +191,19 @@ Browser* ExtensionDOMUI::GetBrowser() const { return BrowserList::FindBrowserWithProfile(DOMUI::GetProfile()); } +TabContents* ExtensionDOMUI::associated_tab_contents() const { + return tab_contents(); +} + Profile* ExtensionDOMUI::GetProfile() { return DOMUI::GetProfile(); } +ExtensionBookmarkManagerEventRouter* +ExtensionDOMUI::extension_bookmark_manager_event_router() { + return extension_bookmark_manager_event_router_.get(); +} + gfx::NativeWindow ExtensionDOMUI::GetCustomFrameNativeWindow() { if (GetBrowser()) return NULL; diff --git a/chrome/browser/extensions/extension_dom_ui.h b/chrome/browser/extensions/extension_dom_ui.h index a6c598f..22a106c 100644 --- a/chrome/browser/extensions/extension_dom_ui.h +++ b/chrome/browser/extensions/extension_dom_ui.h @@ -35,6 +35,8 @@ class ExtensionDOMUI explicit ExtensionDOMUI(TabContents* tab_contents, GURL url); + virtual ~ExtensionDOMUI(); + ExtensionFunctionDispatcher* extension_function_dispatcher() const { return extension_function_dispatcher_.get(); } @@ -48,15 +50,11 @@ class ExtensionDOMUI virtual Browser* GetBrowser() const; virtual gfx::NativeView GetNativeViewOfHost(); virtual gfx::NativeWindow GetCustomFrameNativeWindow(); - virtual TabContents* associated_tab_contents() const { - return tab_contents(); - } + virtual TabContents* associated_tab_contents() const; virtual Profile* GetProfile(); virtual ExtensionBookmarkManagerEventRouter* - extension_bookmark_manager_event_router() { - return extension_bookmark_manager_event_router_.get(); - } + extension_bookmark_manager_event_router(); // BrowserURLHandler static bool HandleChromeURLOverride(GURL* url, Profile* profile); diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc index 412c091..6c07488 100644 --- a/chrome/browser/extensions/extension_history_api.cc +++ b/chrome/browser/extensions/extension_history_api.cc @@ -82,6 +82,10 @@ void ExtensionHistoryEventRouter::ObserveProfile(Profile* profile) { } } +ExtensionHistoryEventRouter::ExtensionHistoryEventRouter() {} + +ExtensionHistoryEventRouter::~ExtensionHistoryEventRouter() {} + void ExtensionHistoryEventRouter::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/extensions/extension_history_api.h b/chrome/browser/extensions/extension_history_api.h index 9bd89e3..a0694f4 100644 --- a/chrome/browser/extensions/extension_history_api.h +++ b/chrome/browser/extensions/extension_history_api.h @@ -28,8 +28,8 @@ class ExtensionHistoryEventRouter : public NotificationObserver { private: friend struct DefaultSingletonTraits<ExtensionHistoryEventRouter>; - ExtensionHistoryEventRouter() {} - virtual ~ExtensionHistoryEventRouter() {} + ExtensionHistoryEventRouter(); + virtual ~ExtensionHistoryEventRouter(); // NotificationObserver::Observe. virtual void Observe(NotificationType type, diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 52a4b4fe..fc71437 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -68,6 +68,12 @@ static const int kMaxUpdateFrequencySeconds = 60 * 60 * 24 * 7; // 7 days // request. We want to stay under 2K because of proxies, etc. static const int kExtensionsManifestMaxURLSize = 2000; +ManifestFetchData::ManifestFetchData(GURL update_url) + : base_url_(update_url), + full_url_(update_url) { +} + +ManifestFetchData::~ManifestFetchData() {} // The format for request parameters in update checks is: // @@ -126,6 +132,10 @@ bool ManifestFetchData::AddExtension(std::string id, std::string version, return true; } +bool ManifestFetchData::Includes(std::string extension_id) const { + return extension_ids_.find(extension_id) != extension_ids_.end(); +} + bool ManifestFetchData::DidPing(std::string extension_id) const { std::map<std::string, int>::const_iterator i = ping_days_.find(extension_id); if (i != ping_days_.end()) { diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h index ad8d243..6f646e1 100644 --- a/chrome/browser/extensions/extension_updater.h +++ b/chrome/browser/extensions/extension_updater.h @@ -36,8 +36,8 @@ class ManifestFetchData { public: static const int kNeverPinged = -1; - explicit ManifestFetchData(GURL update_url) : base_url_(update_url), - full_url_(update_url) {} + explicit ManifestFetchData(GURL update_url); + ~ManifestFetchData(); // Returns true if this extension information was successfully added. If the // return value is false it means the full_url would have become too long, and @@ -50,9 +50,7 @@ class ManifestFetchData { const std::set<std::string>& extension_ids() const { return extension_ids_; } // Returns true if the given id is included in this manifest fetch. - bool Includes(std::string extension_id) const { - return extension_ids_.find(extension_id) != extension_ids_.end(); - } + bool Includes(std::string extension_id) const; // Returns true if a ping parameter was added to full_url for this extension // id. diff --git a/chrome/browser/extensions/file_reader.cc b/chrome/browser/extensions/file_reader.cc index 485565f..b46e1d1 100644 --- a/chrome/browser/extensions/file_reader.cc +++ b/chrome/browser/extensions/file_reader.cc @@ -22,6 +22,8 @@ void FileReader::Start() { NewRunnableMethod(this, &FileReader::ReadFileOnBackgroundThread)); } +FileReader::~FileReader() {} + void FileReader::ReadFileOnBackgroundThread() { std::string data; bool success = file_util::ReadFileToString(resource_.GetFilePath(), &data); diff --git a/chrome/browser/extensions/file_reader.h b/chrome/browser/extensions/file_reader.h index b64d83c..c26ce11 100644 --- a/chrome/browser/extensions/file_reader.h +++ b/chrome/browser/extensions/file_reader.h @@ -32,7 +32,7 @@ class FileReader : public base::RefCountedThreadSafe<FileReader> { private: friend class base::RefCountedThreadSafe<FileReader>; - ~FileReader() {} + virtual ~FileReader(); void ReadFileOnBackgroundThread(); void RunCallback(bool success, const std::string& data); diff --git a/chrome/browser/extensions/pack_extension_job.cc b/chrome/browser/extensions/pack_extension_job.cc index d363631..5f64025 100644 --- a/chrome/browser/extensions/pack_extension_job.cc +++ b/chrome/browser/extensions/pack_extension_job.cc @@ -30,6 +30,8 @@ void PackExtensionJob::ClearClient() { client_ = NULL; } +PackExtensionJob::~PackExtensionJob() {} + void PackExtensionJob::RunOnFileThread() { crx_file_out_ = FilePath(root_directory_.value() + chrome::kExtensionFileExtension); diff --git a/chrome/browser/extensions/pack_extension_job.h b/chrome/browser/extensions/pack_extension_job.h index 62e226d..ecd3d68 100644 --- a/chrome/browser/extensions/pack_extension_job.h +++ b/chrome/browser/extensions/pack_extension_job.h @@ -48,7 +48,7 @@ class PackExtensionJob : public base::RefCountedThreadSafe<PackExtensionJob> { private: friend class base::RefCountedThreadSafe<PackExtensionJob>; - ~PackExtensionJob() {} + virtual ~PackExtensionJob(); void RunOnFileThread(); void ReportSuccessOnClientThread(); diff --git a/chrome/browser/gtk/extension_installed_bubble_gtk.cc b/chrome/browser/gtk/extension_installed_bubble_gtk.cc index f5a6f5f..c3ad8d6 100644 --- a/chrome/browser/gtk/extension_installed_bubble_gtk.cc +++ b/chrome/browser/gtk/extension_installed_bubble_gtk.cc @@ -75,6 +75,8 @@ ExtensionInstalledBubbleGtk::ExtensionInstalledBubbleGtk(Extension *extension, NotificationService::AllSources()); } +ExtensionInstalledBubbleGtk::~ExtensionInstalledBubbleGtk() {} + void ExtensionInstalledBubbleGtk::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/gtk/extension_installed_bubble_gtk.h b/chrome/browser/gtk/extension_installed_bubble_gtk.h index 17b6672d..9b8483c 100644 --- a/chrome/browser/gtk/extension_installed_bubble_gtk.h +++ b/chrome/browser/gtk/extension_installed_bubble_gtk.h @@ -54,7 +54,7 @@ class ExtensionInstalledBubbleGtk ExtensionInstalledBubbleGtk(Extension *extension, Browser *browser, SkBitmap icon); - ~ExtensionInstalledBubbleGtk() {} + virtual ~ExtensionInstalledBubbleGtk(); // Shows the bubble. Called internally via PostTask. void ShowInternal(); diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 51c71cc..22bdcff 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -160,6 +160,8 @@ TabRendererGtk::LoadingAnimation::LoadingAnimation( animation_frame_(0) { } +TabRendererGtk::LoadingAnimation::~LoadingAnimation() {} + bool TabRendererGtk::LoadingAnimation::ValidateLoadingAnimation( AnimationState animation_state) { bool has_changed = false; diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h index f3a9763..b25e001 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h @@ -61,6 +61,8 @@ class TabRendererGtk : public AnimationDelegate, // Used in unit tests to inject specific data. explicit LoadingAnimation(const LoadingAnimation::Data& data); + virtual ~LoadingAnimation(); + // Advance the loading animation to the next frame, or hide the animation if // the tab isn't loading. Returns |true| if the icon area needs to be // repainted. diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc index ea76e59..8b68971 100644 --- a/chrome/browser/history/in_memory_url_index.cc +++ b/chrome/browser/history/in_memory_url_index.cc @@ -33,6 +33,19 @@ ScoredHistoryMatch::ScoredHistoryMatch(const URLRow& url_info, raw_score(score) { } +struct InMemoryURLIndex::TermCharWordSet { + TermCharWordSet(Char16Set char_set, WordIDSet word_id_set, bool used) + : char_set_(char_set), + word_id_set_(word_id_set), + used_(used) {} + + bool IsNotUsed() const { return !used_; } + + Char16Set char_set_; + WordIDSet word_id_set_; + bool used_; // true if this set has been used for the current term search. +}; + InMemoryURLIndex::InMemoryURLIndex() : history_item_count_(0) {} InMemoryURLIndex::~InMemoryURLIndex() {} diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h index 8008a74..6993e0d 100644 --- a/chrome/browser/history/in_memory_url_index.h +++ b/chrome/browser/history/in_memory_url_index.h @@ -120,18 +120,7 @@ class InMemoryURLIndex { // Support caching of term character intersections so that we can optimize // searches which build upon a previous search. - struct TermCharWordSet { - TermCharWordSet(Char16Set char_set, WordIDSet word_id_set, bool used) - : char_set_(char_set), - word_id_set_(word_id_set), - used_(used) {} - - bool IsNotUsed() const { return !used_; } - - Char16Set char_set_; - WordIDSet word_id_set_; - bool used_; // true if this set has been used for the current term search. - }; + struct TermCharWordSet; typedef std::vector<TermCharWordSet> TermCharWordSetVector; // TODO(rohitrao): Probably replace this with QueryResults. diff --git a/chrome/browser/history/page_usage_data.cc b/chrome/browser/history/page_usage_data.cc index f202538..8fc2d8b 100644 --- a/chrome/browser/history/page_usage_data.cc +++ b/chrome/browser/history/page_usage_data.cc @@ -8,6 +8,17 @@ #include "third_party/skia/include/core/SkBitmap.h" +PageUsageData::PageUsageData(history::URLID id) + : id_(id), + thumbnail_(NULL), + thumbnail_set_(false), + thumbnail_pending_(false), + favicon_(NULL), + favicon_set_(false), + favicon_pending_(false), + score_(0.0) { +} + PageUsageData::~PageUsageData() { delete thumbnail_; delete favicon_; diff --git a/chrome/browser/history/page_usage_data.h b/chrome/browser/history/page_usage_data.h index b7a689a..41d9841 100644 --- a/chrome/browser/history/page_usage_data.h +++ b/chrome/browser/history/page_usage_data.h @@ -24,16 +24,7 @@ class SkBitmap; ///////////////////////////////////////////////////////////////////////////// class PageUsageData { public: - explicit PageUsageData(history::URLID id) - : id_(id), - thumbnail_(NULL), - thumbnail_set_(false), - thumbnail_pending_(false), - favicon_(NULL), - favicon_set_(false), - favicon_pending_(false), - score_(0.0) { - } + explicit PageUsageData(history::URLID id); virtual ~PageUsageData(); diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc index 7454681..84367d3 100644 --- a/chrome/browser/history/text_database.cc +++ b/chrome/browser/history/text_database.cc @@ -58,6 +58,10 @@ const FilePath::CharType kFilePrefix[] = FILE_PATH_LITERAL("History Index "); } // namespace +TextDatabase::Match::Match() {} + +TextDatabase::Match::~Match() {} + TextDatabase::TextDatabase(const FilePath& path, DBIdent id, bool allow_create) diff --git a/chrome/browser/history/text_database.h b/chrome/browser/history/text_database.h index e881888..9fb3c0d 100644 --- a/chrome/browser/history/text_database.h +++ b/chrome/browser/history/text_database.h @@ -28,6 +28,9 @@ class TextDatabase { // Returned from the search function. struct Match { + Match(); + ~Match(); + // URL of the match. GURL url; diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc index 5e2a78c..96a9bc2 100644 --- a/chrome/browser/host_content_settings_map.cc +++ b/chrome/browser/host_content_settings_map.cc @@ -101,6 +101,12 @@ static bool ShouldAllowAllContent(const GURL& url) { } } // namespace + +struct HostContentSettingsMap::ExtendedContentSettings { + ContentSettings content_settings; + ResourceContentSettings content_settings_for_resources; +}; + // static HostContentSettingsMap::Pattern HostContentSettingsMap::Pattern::FromURL( const GURL& url) { diff --git a/chrome/browser/host_content_settings_map.h b/chrome/browser/host_content_settings_map.h index 24518bf..25edb99 100644 --- a/chrome/browser/host_content_settings_map.h +++ b/chrome/browser/host_content_settings_map.h @@ -247,11 +247,7 @@ class HostContentSettingsMap typedef std::map<ContentSettingsTypeResourceIdentifierPair, ContentSetting> ResourceContentSettings; - struct ExtendedContentSettings { - ContentSettings content_settings; - ResourceContentSettings content_settings_for_resources; - }; - + struct ExtendedContentSettings; typedef std::map<std::string, ExtendedContentSettings> HostContentSettings; // Sets the fields of |settings| based on the values in |dictionary|. diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index 6c1ea77..0318219 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc @@ -24,6 +24,15 @@ #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" #endif +ProcessMemoryInformation::ProcessMemoryInformation() + : pid(0), + num_processes(0), + is_diagnostics(false), + type(ChildProcessInfo::UNKNOWN_PROCESS) { +} + +ProcessMemoryInformation::~ProcessMemoryInformation() {} + // About threading: // // This operation will hit no fewer than 3 threads. @@ -36,7 +45,6 @@ // one task run for that long on the UI or IO threads. So, we run the // expensive parts of this operation over on the file thread. // - void MemoryDetails::StartFetch() { DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::FILE)); @@ -48,6 +56,8 @@ void MemoryDetails::StartFetch() { NewRunnableMethod(this, &MemoryDetails::CollectChildInfoOnIOThread)); } +MemoryDetails::~MemoryDetails() {} + void MemoryDetails::CollectChildInfoOnIOThread() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h index e9ceb464..1513ab4 100644 --- a/chrome/browser/memory_details.h +++ b/chrome/browser/memory_details.h @@ -16,12 +16,8 @@ // have multiple processes (of course!). Even IE has multiple // processes these days. struct ProcessMemoryInformation { - ProcessMemoryInformation() - : pid(0), - num_processes(0), - is_diagnostics(false), - type(ChildProcessInfo::UNKNOWN_PROCESS) { - } + ProcessMemoryInformation(); + ~ProcessMemoryInformation(); // The process id. base::ProcessId pid; @@ -101,7 +97,7 @@ class MemoryDetails : public base::RefCountedThreadSafe<MemoryDetails> { protected: friend class base::RefCountedThreadSafe<MemoryDetails>; - virtual ~MemoryDetails() {} + virtual ~MemoryDetails(); private: // Collect child process information on the IO thread. This is needed because diff --git a/chrome/browser/net/url_info.cc b/chrome/browser/net/url_info.cc index cbf35db..c383359 100644 --- a/chrome/browser/net/url_info.cc +++ b/chrome/browser/net/url_info.cc @@ -30,6 +30,17 @@ void EnablePredictorDetailedLog(bool enable) { // static int UrlInfo::sequence_counter = 1; +UrlInfo::UrlInfo() + : state_(PENDING), + old_prequeue_state_(state_), + resolve_duration_(kNullDuration), + queue_duration_(kNullDuration), + sequence_number_(0), + motivation_(NO_PREFETCH_MOTIVATION), + was_linked_(false) { +} + +UrlInfo::~UrlInfo() {} bool UrlInfo::NeedsDnsUpdate() { switch (state_) { diff --git a/chrome/browser/net/url_info.h b/chrome/browser/net/url_info.h index 6b50f42..378edbf 100644 --- a/chrome/browser/net/url_info.h +++ b/chrome/browser/net/url_info.h @@ -74,17 +74,9 @@ class UrlInfo { // UrlInfo are usually made by the default constructor during // initializing of the Predictor's map (of info for Hostnames). - UrlInfo() - : state_(PENDING), - old_prequeue_state_(state_), - resolve_duration_(kNullDuration), - queue_duration_(kNullDuration), - sequence_number_(0), - motivation_(NO_PREFETCH_MOTIVATION), - was_linked_(false) { - } + UrlInfo(); - ~UrlInfo() {} + ~UrlInfo(); // NeedDnsUpdate decides, based on our internal info, // if it would be valuable to attempt to update (prefectch) diff --git a/chrome/browser/net/url_request_mock_net_error_job.cc b/chrome/browser/net/url_request_mock_net_error_job.cc index a590833..f4aa330 100644 --- a/chrome/browser/net/url_request_mock_net_error_job.cc +++ b/chrome/browser/net/url_request_mock_net_error_job.cc @@ -19,6 +19,20 @@ URLRequestMockNetErrorJob::URLMockInfoMap URLRequestMockNetErrorJob::url_mock_info_map_; +struct URLRequestMockNetErrorJob::MockInfo { + MockInfo() : ssl_cert(NULL) { } + MockInfo(std::wstring base, + std::vector<int> errors, + net::X509Certificate* ssl_cert) + : base(base), + errors(errors), + ssl_cert(ssl_cert) { } + + std::wstring base; + std::vector<int> errors; + scoped_refptr<net::X509Certificate> ssl_cert; +}; + // static void URLRequestMockNetErrorJob::AddMockedURL(const GURL& url, const std::wstring& base, diff --git a/chrome/browser/net/url_request_mock_net_error_job.h b/chrome/browser/net/url_request_mock_net_error_job.h index 4519161..059272f 100644 --- a/chrome/browser/net/url_request_mock_net_error_job.h +++ b/chrome/browser/net/url_request_mock_net_error_job.h @@ -38,19 +38,6 @@ class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob { private: ~URLRequestMockNetErrorJob(); - struct MockInfo { - MockInfo() : ssl_cert(NULL) { } - MockInfo(std::wstring base, - std::vector<int> errors, - net::X509Certificate* ssl_cert) - : base(base), - errors(errors), - ssl_cert(ssl_cert) { } - - std::wstring base; - std::vector<int> errors; - scoped_refptr<net::X509Certificate> ssl_cert; - }; static URLRequest::ProtocolFactory Factory; @@ -62,6 +49,7 @@ class URLRequestMockNetErrorJob : public URLRequestMockHTTPJob { // The certificate to use for SSL errors. scoped_refptr<net::X509Certificate> ssl_cert_; + struct MockInfo; typedef std::map<GURL, MockInfo> URLMockInfoMap; static URLMockInfoMap url_mock_info_map_; diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc index 4ae9ee0..4035de3 100644 --- a/chrome/browser/password_manager/password_store.cc +++ b/chrome/browser/password_manager/password_store.cc @@ -28,6 +28,8 @@ void PasswordStore::ReportMetrics() { ScheduleTask(NewRunnableMethod(this, &PasswordStore::ReportMetricsImpl)); } +PasswordStore::~PasswordStore() {} + void PasswordStore::AddLogin(const PasswordForm& form) { ScheduleTask(NewRunnableMethod(this, &PasswordStore::AddLoginImpl, form)); } diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h index 6b538d9..4ab5575 100644 --- a/chrome/browser/password_manager/password_store.h +++ b/chrome/browser/password_manager/password_store.h @@ -85,7 +85,7 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> { friend class browser_sync::PasswordModelWorker; friend class LivePasswordsSyncTest; - virtual ~PasswordStore() {} + virtual ~PasswordStore(); // Simple container class that represents a login lookup request. class GetLoginsRequest { diff --git a/chrome/browser/policy/configuration_policy_provider.cc b/chrome/browser/policy/configuration_policy_provider.cc index f828836..0c7f2fd 100644 --- a/chrome/browser/policy/configuration_policy_provider.cc +++ b/chrome/browser/policy/configuration_policy_provider.cc @@ -21,6 +21,8 @@ ConfigurationPolicyProvider::ConfigurationPolicyProvider( } } +ConfigurationPolicyProvider::~ConfigurationPolicyProvider() {} + void ConfigurationPolicyProvider::NotifyStoreOfPolicyChange() { NotificationService::current()->Notify( NotificationType::POLICY_CHANGED, diff --git a/chrome/browser/policy/configuration_policy_provider.h b/chrome/browser/policy/configuration_policy_provider.h index 494f5a8..4115107 100644 --- a/chrome/browser/policy/configuration_policy_provider.h +++ b/chrome/browser/policy/configuration_policy_provider.h @@ -34,7 +34,7 @@ class ConfigurationPolicyProvider { explicit ConfigurationPolicyProvider(const StaticPolicyValueMap& policy_map); - virtual ~ConfigurationPolicyProvider() {} + virtual ~ConfigurationPolicyProvider(); // Must be implemented by provider subclasses to specify the // provider-specific policy decisions. The preference service diff --git a/chrome/browser/policy/managed_prefs_banner_base.cc b/chrome/browser/policy/managed_prefs_banner_base.cc index e02ec25..1351da4 100644 --- a/chrome/browser/policy/managed_prefs_banner_base.cc +++ b/chrome/browser/policy/managed_prefs_banner_base.cc @@ -6,6 +6,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/prefs/pref_service.h" +#include "chrome/browser/prefs/pref_set_observer.h" #include "chrome/common/notification_details.h" #include "chrome/common/notification_type.h" #include "chrome/common/pref_names.h" @@ -23,6 +24,8 @@ ManagedPrefsBannerBase::ManagedPrefsBannerBase(PrefService* local_state, Init(local_state, user_prefs, page); } +ManagedPrefsBannerBase::~ManagedPrefsBannerBase() {} + void ManagedPrefsBannerBase::AddLocalStatePref(const char* pref) { local_state_set_->AddPref(pref); } diff --git a/chrome/browser/policy/managed_prefs_banner_base.h b/chrome/browser/policy/managed_prefs_banner_base.h index e175175..e087cb1 100644 --- a/chrome/browser/policy/managed_prefs_banner_base.h +++ b/chrome/browser/policy/managed_prefs_banner_base.h @@ -9,10 +9,10 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "chrome/browser/options_window.h" -#include "chrome/browser/prefs/pref_set_observer.h" #include "chrome/common/notification_observer.h" class PrefService; +class PrefSetObserver; namespace policy { @@ -32,6 +32,8 @@ class ManagedPrefsBannerBase : public NotificationObserver { // global g_browser_process. ManagedPrefsBannerBase(PrefService* user_prefs, OptionsPage page); + virtual ~ManagedPrefsBannerBase(); + // Determine whether the banner should be visible. bool DetermineVisibility() const; diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc index 3331ed5b..8d398b6 100644 --- a/chrome/browser/prefs/command_line_pref_store.cc +++ b/chrome/browser/prefs/command_line_pref_store.cc @@ -28,12 +28,16 @@ CommandLinePrefStore::CommandLinePrefStore(const CommandLine* command_line) : command_line_(command_line), prefs_(new DictionaryValue()) {} +CommandLinePrefStore::~CommandLinePrefStore() {} + PrefStore::PrefReadError CommandLinePrefStore::ReadPrefs() { ApplySimpleSwitches(); ValidateProxySwitches(); return PrefStore::PREF_READ_ERROR_NONE; } +DictionaryValue* CommandLinePrefStore::prefs() { return prefs_.get(); } + void CommandLinePrefStore::ApplySimpleSwitches() { // Look for each switch we know about and set its preference accordingly. for (size_t i = 0; i < arraysize(string_switch_map_); ++i) { diff --git a/chrome/browser/prefs/command_line_pref_store.h b/chrome/browser/prefs/command_line_pref_store.h index 89e49ce..8dd7cd5 100644 --- a/chrome/browser/prefs/command_line_pref_store.h +++ b/chrome/browser/prefs/command_line_pref_store.h @@ -18,11 +18,11 @@ class DictionaryValue; class CommandLinePrefStore : public PrefStore { public: explicit CommandLinePrefStore(const CommandLine* command_line); - virtual ~CommandLinePrefStore() {} + virtual ~CommandLinePrefStore(); // PrefStore methods: virtual PrefReadError ReadPrefs(); - virtual DictionaryValue* prefs() { return prefs_.get(); } + virtual DictionaryValue* prefs(); protected: // Logs a message and returns false if the proxy switches are diff --git a/chrome/browser/prefs/pref_set_observer.cc b/chrome/browser/prefs/pref_set_observer.cc index 70810c6..a073eb2 100644 --- a/chrome/browser/prefs/pref_set_observer.cc +++ b/chrome/browser/prefs/pref_set_observer.cc @@ -14,6 +14,8 @@ PrefSetObserver::PrefSetObserver(PrefService* pref_service, registrar_.Init(pref_service); } +PrefSetObserver::~PrefSetObserver() {} + void PrefSetObserver::AddPref(const std::string& pref) { if (!prefs_.count(pref) && pref_service_->FindPreference(pref.c_str())) { prefs_.insert(pref); diff --git a/chrome/browser/prefs/pref_set_observer.h b/chrome/browser/prefs/pref_set_observer.h index ff350df..568265c 100644 --- a/chrome/browser/prefs/pref_set_observer.h +++ b/chrome/browser/prefs/pref_set_observer.h @@ -20,7 +20,7 @@ class PrefSetObserver : public NotificationObserver { // Initialize with an empty set of preferences. PrefSetObserver(PrefService* pref_service, NotificationObserver* observer); - virtual ~PrefSetObserver() {} + virtual ~PrefSetObserver(); // Add a |pref| to the set of preferences to observe. void AddPref(const std::string& pref); diff --git a/chrome/browser/renderer_host/mock_render_process_host.cc b/chrome/browser/renderer_host/mock_render_process_host.cc index cdecb6f..a2ccfa0 100644 --- a/chrome/browser/renderer_host/mock_render_process_host.cc +++ b/chrome/browser/renderer_host/mock_render_process_host.cc @@ -87,6 +87,10 @@ bool MockRenderProcessHost::SendWithTimeout(IPC::Message* msg, int timeout_ms) { return true; } +base::ProcessHandle MockRenderProcessHost::GetHandle() { + return base::kNullProcessHandle; +} + bool MockRenderProcessHost::Send(IPC::Message* msg) { // Save the message in the sink. sink_.OnMessageReceived(*msg); @@ -119,6 +123,8 @@ void MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { } +MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} + MockRenderProcessHostFactory::~MockRenderProcessHostFactory() { // Detach this object from MockRenderProcesses to prevent STLDeleteElements() // from calling MockRenderProcessHostFactory::Remove(). diff --git a/chrome/browser/renderer_host/mock_render_process_host.h b/chrome/browser/renderer_host/mock_render_process_host.h index 33a6516..232725b 100644 --- a/chrome/browser/renderer_host/mock_render_process_host.h +++ b/chrome/browser/renderer_host/mock_render_process_host.h @@ -51,9 +51,7 @@ class MockRenderProcessHost : public RenderProcessHost { virtual void ResetVisitedLinks(); virtual bool FastShutdownIfPossible(); virtual bool SendWithTimeout(IPC::Message* msg, int timeout_ms); - virtual base::ProcessHandle GetHandle() { - return base::kNullProcessHandle; - } + virtual base::ProcessHandle GetHandle(); virtual TransportDIB* GetTransportDIB(TransportDIB::Id dib_id); @@ -82,7 +80,7 @@ class MockRenderProcessHost : public RenderProcessHost { class MockRenderProcessHostFactory : public RenderProcessHostFactory { public: - MockRenderProcessHostFactory() {} + MockRenderProcessHostFactory(); virtual ~MockRenderProcessHostFactory(); virtual RenderProcessHost* CreateRenderProcessHost(Profile* profile) const; diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 3f19e58..cea0c94 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -1665,6 +1665,8 @@ SetCookieCompletion::SetCookieCompletion(int render_process_id, context_(context) { } +SetCookieCompletion::~SetCookieCompletion() {} + void SetCookieCompletion::RunWithParams(const Tuple1<int>& params) { int result = params.a; bool blocked_by_policy = true; @@ -1703,6 +1705,8 @@ GetCookiesCompletion::GetCookiesCompletion(int render_process_id, set_cookie_store(context_->cookie_store()); } +GetCookiesCompletion::~GetCookiesCompletion() {} + void GetCookiesCompletion::RunWithParams(const Tuple1<int>& params) { if (!raw_cookies_) { int result = params.a; diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 7c46541..97d3992 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -510,6 +510,7 @@ class SetCookieCompletion : public net::CompletionCallback { const GURL& url, const std::string& cookie_line, ChromeURLRequestContext* context); + virtual ~SetCookieCompletion(); virtual void RunWithParams(const Tuple1<int>& params); @@ -537,6 +538,7 @@ class GetCookiesCompletion : public net::CompletionCallback { ResourceMessageFilter* filter, URLRequestContext* context, bool raw_cookies); + virtual ~GetCookiesCompletion(); virtual void RunWithParams(const Tuple1<int>& params); diff --git a/chrome/browser/sync/glue/ui_model_worker.cc b/chrome/browser/sync/glue/ui_model_worker.cc index 62b0b15..86dbf44 100644 --- a/chrome/browser/sync/glue/ui_model_worker.cc +++ b/chrome/browser/sync/glue/ui_model_worker.cc @@ -41,6 +41,14 @@ void UIModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { work_done.Wait(); } +UIModelWorker::UIModelWorker(MessageLoop* ui_loop) + : state_(WORKING), + pending_work_(NULL), + syncapi_has_shutdown_(false), + ui_loop_(ui_loop), + syncapi_event_(&lock_) { +} + UIModelWorker::~UIModelWorker() { DCHECK_EQ(state_, STOPPED); } diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h index f1df84c..66a2a995 100644 --- a/chrome/browser/sync/glue/ui_model_worker.h +++ b/chrome/browser/sync/glue/ui_model_worker.h @@ -31,13 +31,7 @@ namespace browser_sync { // after the actual syncer pthread has exited. class UIModelWorker : public browser_sync::ModelSafeWorker { public: - explicit UIModelWorker(MessageLoop* ui_loop) - : state_(WORKING), - pending_work_(NULL), - syncapi_has_shutdown_(false), - ui_loop_(ui_loop), - syncapi_event_(&lock_) { - } + explicit UIModelWorker(MessageLoop* ui_loop); virtual ~UIModelWorker(); // A simple task to signal a waitable event after Run()ning a Closure. diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc index 6b27cd5..3ff8502 100644 --- a/chrome/browser/translate/translate_infobar_delegate.cc +++ b/chrome/browser/translate/translate_infobar_delegate.cc @@ -100,6 +100,8 @@ TranslateInfoBarDelegate::TranslateInfoBarDelegate( } } +TranslateInfoBarDelegate::~TranslateInfoBarDelegate() {} + int TranslateInfoBarDelegate::GetLanguageCount() const { return static_cast<int>(languages_.size()); } @@ -208,6 +210,12 @@ InfoBarDelegate::Type TranslateInfoBarDelegate::GetInfoBarType() { return InfoBarDelegate::PAGE_ACTION_TYPE; } +TranslateInfoBarDelegate* +TranslateInfoBarDelegate::AsTranslateInfoBarDelegate() { + return this; +} + + bool TranslateInfoBarDelegate::IsLanguageBlacklisted() { return prefs_.IsLanguageBlacklisted(GetOriginalLanguageCode()); } diff --git a/chrome/browser/translate/translate_infobar_delegate.h b/chrome/browser/translate/translate_infobar_delegate.h index 0359caf..549af3d 100644 --- a/chrome/browser/translate/translate_infobar_delegate.h +++ b/chrome/browser/translate/translate_infobar_delegate.h @@ -51,6 +51,8 @@ class TranslateInfoBarDelegate : public InfoBarDelegate { const std::string& original_language, const std::string& target_language); + virtual ~TranslateInfoBarDelegate(); + // Returns the number of languages supported. int GetLanguageCount() const; @@ -102,9 +104,7 @@ class TranslateInfoBarDelegate : public InfoBarDelegate { virtual void InfoBarClosed(); virtual SkBitmap* GetIcon() const; virtual InfoBarDelegate::Type GetInfoBarType(); - virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() { - return this; - } + virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); // Methods called by the Options menu delegate. virtual bool IsLanguageBlacklisted(); diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc index b87523c..b579f88 100644 --- a/chrome/renderer/mock_printer.cc +++ b/chrome/renderer/mock_printer.cc @@ -12,6 +12,19 @@ #include "printing/units.h" #include "testing/gtest/include/gtest/gtest.h" +MockPrinterPage::MockPrinterPage(const void* source_data, + uint32 source_size, + const printing::Image& image) + : source_size_(source_size), + image_(image) { + // Create copies of the source data + source_data_.reset(new uint8[source_size]); + if (source_data_.get()) + memcpy(source_data_.get(), source_data, source_size); +} + +MockPrinterPage::~MockPrinterPage() {} + MockPrinter::MockPrinter() : printable_width_(0), printable_height_(0), diff --git a/chrome/renderer/mock_printer.h b/chrome/renderer/mock_printer.h index 1a27076..ddd55ac 100644 --- a/chrome/renderer/mock_printer.h +++ b/chrome/renderer/mock_printer.h @@ -26,17 +26,7 @@ class MockPrinterPage : public base::RefCounted<MockPrinterPage> { public: MockPrinterPage(const void* source_data, uint32 source_size, - const printing::Image& image) - : source_size_(source_size), - image_(image) { - // Create copies of the source data - source_data_.reset(new uint8[source_size]); - if (source_data_.get()) - memcpy(source_data_.get(), source_data, source_size); - } - - ~MockPrinterPage() { - } + const printing::Image& image); int width() const { return image_.size().width(); } int height() const { return image_.size().height(); } @@ -45,6 +35,9 @@ class MockPrinterPage : public base::RefCounted<MockPrinterPage> { const printing::Image& image() const { return image_; } private: + friend class base::RefCounted<MockPrinterPage>; + virtual ~MockPrinterPage(); + uint32 source_size_; scoped_array<uint8> source_data_; printing::Image image_; diff --git a/chrome/service/cloud_print/job_status_updater.cc b/chrome/service/cloud_print/job_status_updater.cc index 7c7d1ca..1f36b2a 100644 --- a/chrome/service/cloud_print/job_status_updater.cc +++ b/chrome/service/cloud_print/job_status_updater.cc @@ -26,6 +26,8 @@ JobStatusUpdater::JobStatusUpdater(const std::string& printer_name, DCHECK(delegate_); } +JobStatusUpdater::~JobStatusUpdater() {} + // Start checking the status of the local print job. void JobStatusUpdater::UpdateStatus() { // It does not matter if we had already sent out an update and are waiting for diff --git a/chrome/service/cloud_print/job_status_updater.h b/chrome/service/cloud_print/job_status_updater.h index d617bde..6e111cd 100644 --- a/chrome/service/cloud_print/job_status_updater.h +++ b/chrome/service/cloud_print/job_status_updater.h @@ -39,10 +39,12 @@ class JobStatusUpdater : public base::RefCountedThreadSafe<JobStatusUpdater>, const GURL& cloud_print_server_url, cloud_print::PrintSystem* print_system, Delegate* delegate); - virtual ~JobStatusUpdater() {} + virtual ~JobStatusUpdater(); + // Checks the status of the local print job and sends an update. void UpdateStatus(); void Stop(); + // URLFetcher::Delegate implementation. virtual void OnURLFetchComplete(const URLFetcher* source, const GURL& url, const URLRequestStatus& status, diff --git a/chrome/service/net/service_url_request_context.cc b/chrome/service/net/service_url_request_context.cc index bd39292..3f264a4 100644 --- a/chrome/service/net/service_url_request_context.cc +++ b/chrome/service/net/service_url_request_context.cc @@ -4,6 +4,7 @@ #include "chrome/service/net/service_url_request_context.h" +#include "base/message_loop_proxy.h" #include "chrome/service/service_process.h" #include "net/base/cookie_monster.h" #include "net/base/cookie_policy.h" @@ -16,11 +17,6 @@ #include "net/http/http_network_layer.h" #include "net/proxy/proxy_service.h" -ServiceURLRequestContextGetter::ServiceURLRequestContextGetter() - : io_message_loop_proxy_( - g_service_process->io_thread()->message_loop_proxy()) { -} - ServiceURLRequestContext::ServiceURLRequestContext() { host_resolver_ = net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, @@ -62,3 +58,21 @@ ServiceURLRequestContext::~ServiceURLRequestContext() { delete http_auth_handler_factory_; delete dnsrr_resolver_; } + +ServiceURLRequestContextGetter::ServiceURLRequestContextGetter() + : io_message_loop_proxy_( + g_service_process->io_thread()->message_loop_proxy()) { +} + +URLRequestContext* ServiceURLRequestContextGetter::GetURLRequestContext() { + if (!url_request_context_) + url_request_context_ = new ServiceURLRequestContext(); + return url_request_context_; +} + +scoped_refptr<base::MessageLoopProxy> +ServiceURLRequestContextGetter::GetIOMessageLoopProxy() { + return io_message_loop_proxy_; +} + +ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} diff --git a/chrome/service/net/service_url_request_context.h b/chrome/service/net/service_url_request_context.h index 33ab2e1..379371f 100644 --- a/chrome/service/net/service_url_request_context.h +++ b/chrome/service/net/service_url_request_context.h @@ -8,7 +8,6 @@ #include <string> -#include "base/message_loop_proxy.h" #include "chrome/common/net/url_request_context_getter.h" #include "net/base/cookie_monster.h" #include "net/base/cookie_policy.h" @@ -22,6 +21,10 @@ #include "net/proxy/proxy_service.h" #include "net/url_request/url_request_context.h" +namespace base { +class MessageLoopProxy; +} + // Subclass of URLRequestContext which can be used to store extra information // for requests. This subclass is meant to be used in the service process where // the profile is not available. @@ -55,20 +58,14 @@ class ServiceURLRequestContextGetter : public URLRequestContextGetter { public: ServiceURLRequestContextGetter(); - virtual URLRequestContext* GetURLRequestContext() { - if (!url_request_context_) - url_request_context_ = new ServiceURLRequestContext(); - return url_request_context_; - } - virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() { - return io_message_loop_proxy_; - } + virtual URLRequestContext* GetURLRequestContext(); + virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); void set_user_agent(const std::string& ua) { user_agent_ = ua; } private: - ~ServiceURLRequestContextGetter() {} + virtual ~ServiceURLRequestContextGetter(); std::string user_agent_; scoped_refptr<URLRequestContext> url_request_context_; diff --git a/chrome/test/automation/automation_handle_tracker.cc b/chrome/test/automation/automation_handle_tracker.cc index 5a1e623..ab29c2a 100644 --- a/chrome/test/automation/automation_handle_tracker.cc +++ b/chrome/test/automation/automation_handle_tracker.cc @@ -22,6 +22,8 @@ AutomationResourceProxy::~AutomationResourceProxy() { tracker_->Remove(this); } +AutomationHandleTracker::AutomationHandleTracker() : channel_(NULL) {} + AutomationHandleTracker::~AutomationHandleTracker() { // Tell any live objects that the tracker is going away so they don't try to // call us when they are being destroyed. diff --git a/chrome/test/automation/automation_handle_tracker.h b/chrome/test/automation/automation_handle_tracker.h index 2e93b7b..bfa319a 100644 --- a/chrome/test/automation/automation_handle_tracker.h +++ b/chrome/test/automation/automation_handle_tracker.h @@ -74,7 +74,7 @@ class AutomationResourceProxy // discard the handle. class AutomationHandleTracker { public: - explicit AutomationHandleTracker() : channel_(NULL) {} + explicit AutomationHandleTracker(); ~AutomationHandleTracker(); // Adds the specified proxy object to the tracker. diff --git a/chrome/test/automation/javascript_execution_controller.cc b/chrome/test/automation/javascript_execution_controller.cc index 0c266eb..59308b3 100644 --- a/chrome/test/automation/javascript_execution_controller.cc +++ b/chrome/test/automation/javascript_execution_controller.cc @@ -14,6 +14,10 @@ using javascript_utils::JavaScriptPrintf; // JavaScriptExecutionController will complain. int JavaScriptExecutionController::timeout_ms_ = -1; +JavaScriptExecutionController::JavaScriptExecutionController() {} + +JavaScriptExecutionController::~JavaScriptExecutionController() {} + bool JavaScriptExecutionController::ExecuteJavaScript( const std::string& script) { scoped_ptr<Value> return_value; diff --git a/chrome/test/automation/javascript_execution_controller.h b/chrome/test/automation/javascript_execution_controller.h index 633ce55..afcdcaa 100644 --- a/chrome/test/automation/javascript_execution_controller.h +++ b/chrome/test/automation/javascript_execution_controller.h @@ -22,8 +22,8 @@ class JavaScriptObjectProxy; class JavaScriptExecutionController : public base::SupportsWeakPtr<JavaScriptExecutionController> { public: - JavaScriptExecutionController() {} - virtual ~JavaScriptExecutionController() {} + JavaScriptExecutionController(); + virtual ~JavaScriptExecutionController(); // Executes |script| and parse the return value. Returns whether the // execution and parsing succeeded. diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 3888c79..d0d0426 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -15,6 +15,13 @@ #include "chrome/test/automation/automation_proxy.h" #include "googleurl/src/gurl.h" +TabProxy::TabProxy(AutomationMessageSender* sender, + AutomationHandleTracker* tracker, + int handle) + : AutomationResourceProxy(tracker, sender, handle) { +} + + bool TabProxy::GetTabTitle(std::wstring* title) const { if (!is_valid()) return false; @@ -799,6 +806,8 @@ void TabProxy::OnChannelError() { FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, OnChannelError(this)); } +TabProxy::~TabProxy() {} + bool TabProxy::ExecuteJavaScriptAndGetJSON(const std::string& script, std::string* json) { if (!is_valid()) diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index b360b84..4efbb86 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -57,8 +57,7 @@ class TabProxy : public AutomationResourceProxy, TabProxy(AutomationMessageSender* sender, AutomationHandleTracker* tracker, - int handle) - : AutomationResourceProxy(tracker, sender, handle) {} + int handle); // Gets the current url of the tab. bool GetCurrentURL(GURL* url) const WARN_UNUSED_RESULT; @@ -410,7 +409,7 @@ class TabProxy : public AutomationResourceProxy, void OnMessageReceived(const IPC::Message& message); void OnChannelError(); protected: - virtual ~TabProxy() {} + virtual ~TabProxy(); // Override JavaScriptExecutionController methods. // Executes |script| and gets the response JSON. Returns true on success. diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc index aaa1501..11228e2 100644 --- a/chrome/test/chrome_process_util.cc +++ b/chrome/test/chrome_process_util.cc @@ -103,3 +103,18 @@ size_t ChromeTestProcessMetrics::GetWorkingSetSize() { } #endif // !defined(OS_MACOSX) + +ChromeTestProcessMetrics::~ChromeTestProcessMetrics() {} + +ChromeTestProcessMetrics::ChromeTestProcessMetrics( + base::ProcessHandle process) { +#if !defined(OS_MACOSX) + process_metrics_.reset( + base::ProcessMetrics::CreateProcessMetrics(process)); +#else + process_metrics_.reset( + base::ProcessMetrics::CreateProcessMetrics(process, NULL)); +#endif + process_handle_ = process; +} + diff --git a/chrome/test/chrome_process_util.h b/chrome/test/chrome_process_util.h index a649852..ea716f1 100644 --- a/chrome/test/chrome_process_util.h +++ b/chrome/test/chrome_process_util.h @@ -52,17 +52,10 @@ class ChromeTestProcessMetrics { base::ProcessHandle process_handle_; + ~ChromeTestProcessMetrics(); + private: - explicit ChromeTestProcessMetrics(base::ProcessHandle process) { -#if !defined(OS_MACOSX) - process_metrics_.reset( - base::ProcessMetrics::CreateProcessMetrics(process)); -#else - process_metrics_.reset( - base::ProcessMetrics::CreateProcessMetrics(process, NULL)); -#endif - process_handle_ = process; - } + explicit ChromeTestProcessMetrics(base::ProcessHandle process); scoped_ptr<base::ProcessMetrics> process_metrics_; diff --git a/media/base/callback.cc b/media/base/callback.cc index 1e2b400..484c744 100644 --- a/media/base/callback.cc +++ b/media/base/callback.cc @@ -12,6 +12,12 @@ AutoTaskRunner::~AutoTaskRunner() { } } +AutoCallbackRunner::~AutoCallbackRunner() { + if (callback_.get()) { + callback_->Run(); + } +} + Callback0::Type* TaskToCallbackAdapter::NewCallback(Task* task) { return new TaskToCallbackAdapter(task); } diff --git a/media/base/callback.h b/media/base/callback.h index 2273ace..c21312e 100644 --- a/media/base/callback.h +++ b/media/base/callback.h @@ -51,11 +51,7 @@ class AutoCallbackRunner { : callback_(callback) { } - ~AutoCallbackRunner() { - if (callback_.get()) { - callback_->Run(); - } - } + ~AutoCallbackRunner(); Callback0::Type* release() { return callback_.release(); } diff --git a/media/base/pts_heap.cc b/media/base/pts_heap.cc new file mode 100644 index 0000000..84ff5d9 --- /dev/null +++ b/media/base/pts_heap.cc @@ -0,0 +1,21 @@ +// 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 "media/base/pts_heap.h" + +namespace media { + +PtsHeap::PtsHeap() {} + +PtsHeap::~PtsHeap() {} + +void PtsHeap::Push(const base::TimeDelta& pts) { + queue_.push(pts); +} + +void PtsHeap::Pop() { + queue_.pop(); +} + +} // namespace media diff --git a/media/base/pts_heap.h b/media/base/pts_heap.h index 7795d68..11a3dbc 100644 --- a/media/base/pts_heap.h +++ b/media/base/pts_heap.h @@ -1,6 +1,6 @@ -// Copyright (c) 2009 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. +// 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. #ifndef MEDIA_BASE_PTS_HEAP_H_ #define MEDIA_BASE_PTS_HEAP_H_ @@ -36,10 +36,11 @@ namespace media { class PtsHeap { public: - PtsHeap() {} + PtsHeap(); + ~PtsHeap(); - void Push(const base::TimeDelta& pts) { queue_.push(pts); } - void Pop() { queue_.pop(); } + void Push(const base::TimeDelta& pts); + void Pop(); const base::TimeDelta& Top() const { return queue_.top(); } bool IsEmpty() const { return queue_.empty(); } diff --git a/media/media.gyp b/media/media.gyp index 9dae16a..0afbd79 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -91,6 +91,7 @@ 'base/pipeline.h', 'base/pipeline_impl.cc', 'base/pipeline_impl.h', + 'base/pts_heap.cc', 'base/pts_heap.h', 'base/seekable_buffer.cc', 'base/seekable_buffer.h', diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc index 7dd618a..76690e6 100644 --- a/net/disk_cache/disk_cache_test_util.cc +++ b/net/disk_cache/disk_cache_test_util.cc @@ -125,6 +125,10 @@ ScopedTestCache::~ScopedTestCache() { volatile int g_cache_tests_received = 0; volatile bool g_cache_tests_error = 0; +CallbackTest::CallbackTest(bool reuse) : result_(-1), reuse_(reuse ? 0 : 1) {} + +CallbackTest::~CallbackTest() {} + // On the actual callback, increase the number of tests received and check for // errors (an unexpected test received) void CallbackTest::RunWithParams(const Tuple1<int>& params) { diff --git a/net/disk_cache/disk_cache_test_util.h b/net/disk_cache/disk_cache_test_util.h index f6348e9..a0dbf21c 100644 --- a/net/disk_cache/disk_cache_test_util.h +++ b/net/disk_cache/disk_cache_test_util.h @@ -58,8 +58,8 @@ class ScopedTestCache { // with multiple simultaneous IO operations. class CallbackTest : public CallbackRunner< Tuple1<int> > { public: - explicit CallbackTest(bool reuse) : result_(-1), reuse_(reuse ? 0 : 1) {} - ~CallbackTest() {} + explicit CallbackTest(bool reuse); + virtual ~CallbackTest(); virtual void RunWithParams(const Tuple1<int>& params); int result() const { return result_; } diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 72126f1..9854cc5 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -543,6 +543,29 @@ bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) { return new_npn_value_ = negotiated; } +StaticSocketDataProvider::StaticSocketDataProvider() + : reads_(NULL), + read_index_(0), + read_count_(0), + writes_(NULL), + write_index_(0), + write_count_(0) { +} + +StaticSocketDataProvider::StaticSocketDataProvider(MockRead* reads, + size_t reads_count, + MockWrite* writes, + size_t writes_count) + : reads_(reads), + read_index_(0), + read_count_(reads_count), + writes_(writes), + write_index_(0), + write_count_(writes_count) { +} + +StaticSocketDataProvider::~StaticSocketDataProvider() {} + MockRead StaticSocketDataProvider::GetNextRead() { DCHECK(!at_read_eof()); reads_[read_index_].time_stamp = base::Time::Now(); @@ -611,6 +634,8 @@ DynamicSocketDataProvider::DynamicSocketDataProvider() allow_unconsumed_reads_(false) { } +DynamicSocketDataProvider::~DynamicSocketDataProvider() {} + MockRead DynamicSocketDataProvider::GetNextRead() { if (reads_.empty()) return MockRead(false, ERR_UNEXPECTED); @@ -786,6 +811,8 @@ void OrderedSocketData::CompleteRead() { } } +OrderedSocketData::~OrderedSocketData() {} + DeterministicSocketData::DeterministicSocketData(MockRead* reads, size_t reads_count, MockWrite* writes, size_t writes_count) : StaticSocketDataProvider(reads, reads_count, writes, writes_count), @@ -936,6 +963,10 @@ void DeterministicSocketData::NextStep() { } +MockClientSocketFactory::MockClientSocketFactory() {} + +MockClientSocketFactory::~MockClientSocketFactory() {} + void MockClientSocketFactory::AddSocketDataProvider( SocketDataProvider* data) { mock_data_.Add(data); @@ -987,6 +1018,10 @@ SSLClientSocket* MockClientSocketFactory::CreateSSLClientSocket( return socket; } +DeterministicMockClientSocketFactory::DeterministicMockClientSocketFactory() {} + +DeterministicMockClientSocketFactory::~DeterministicMockClientSocketFactory() {} + void DeterministicMockClientSocketFactory::AddSocketDataProvider( DeterministicSocketData* data) { mock_data_.Add(data); @@ -1107,6 +1142,8 @@ MockTCPClientSocketPool::MockConnectJob::MockConnectJob( connect_callback_(this, &MockConnectJob::OnConnect)) { } +MockTCPClientSocketPool::MockConnectJob::~MockConnectJob() {} + int MockTCPClientSocketPool::MockConnectJob::Connect() { int rv = socket_->Connect(&connect_callback_); if (rv == OK) { diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index 445f3c7..a8e4537 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h @@ -163,18 +163,10 @@ class SocketDataProvider { // writes. class StaticSocketDataProvider : public SocketDataProvider { public: - StaticSocketDataProvider() : reads_(NULL), read_index_(0), read_count_(0), - writes_(NULL), write_index_(0), write_count_(0) {} + StaticSocketDataProvider(); StaticSocketDataProvider(MockRead* reads, size_t reads_count, - MockWrite* writes, size_t writes_count) - : reads_(reads), - read_index_(0), - read_count_(reads_count), - writes_(writes), - write_index_(0), - write_count_(writes_count) { - } - virtual ~StaticSocketDataProvider() {} + MockWrite* writes, size_t writes_count); + virtual ~StaticSocketDataProvider(); // SocketDataProvider methods: virtual MockRead GetNextRead(); @@ -213,6 +205,7 @@ class StaticSocketDataProvider : public SocketDataProvider { class DynamicSocketDataProvider : public SocketDataProvider { public: DynamicSocketDataProvider(); + virtual ~DynamicSocketDataProvider(); // SocketDataProvider methods: virtual MockRead GetNextRead(); @@ -344,6 +337,9 @@ class OrderedSocketData : public StaticSocketDataProvider, void CompleteRead(); private: + friend class base::RefCounted<OrderedSocketData>; + virtual ~OrderedSocketData(); + int sequence_number_; int loop_stop_stage_; CompletionCallback* callback_; @@ -514,6 +510,9 @@ class MockSSLClientSocket; // socket types. class MockClientSocketFactory : public ClientSocketFactory { public: + MockClientSocketFactory(); + virtual ~MockClientSocketFactory(); + void AddSocketDataProvider(SocketDataProvider* socket); void AddSSLSocketDataProvider(SSLSocketDataProvider* socket); void ResetNextMockIndexes(); @@ -806,6 +805,7 @@ class MockTCPClientSocketPool : public TCPClientSocketPool { public: MockConnectJob(ClientSocket* socket, ClientSocketHandle* handle, CompletionCallback* callback); + ~MockConnectJob(); int Connect(); bool CancelHandle(const ClientSocketHandle* handle); @@ -856,6 +856,9 @@ class MockTCPClientSocketPool : public TCPClientSocketPool { class DeterministicMockClientSocketFactory : public ClientSocketFactory { public: + DeterministicMockClientSocketFactory(); + virtual ~DeterministicMockClientSocketFactory(); + void AddSocketDataProvider(DeterministicSocketData* socket); void AddSSLSocketDataProvider(SSLSocketDataProvider* socket); void ResetNextMockIndexes(); diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc index bb947f9..44863e3 100644 --- a/net/url_request/url_request_filter.cc +++ b/net/url_request/url_request_filter.cc @@ -24,6 +24,8 @@ URLRequestJob* URLRequestFilter::Factory(URLRequest* request, return GetInstance()->FindRequestHandler(request, scheme); } +URLRequestFilter::~URLRequestFilter() {} + void URLRequestFilter::AddHostnameHandler(const std::string& scheme, const std::string& hostname, URLRequest::ProtocolFactory* factory) { hostname_handler_map_[make_pair(scheme, hostname)] = factory; @@ -108,6 +110,8 @@ void URLRequestFilter::ClearHandlers() { hit_count_ = 0; } +URLRequestFilter::URLRequestFilter() : hit_count_(0) { } + URLRequestJob* URLRequestFilter::FindRequestHandler(URLRequest* request, const std::string& scheme) { URLRequestJob* job = NULL; diff --git a/net/url_request/url_request_filter.h b/net/url_request/url_request_filter.h index 58f9886..17eb4bb 100644 --- a/net/url_request/url_request_filter.h +++ b/net/url_request/url_request_filter.h @@ -42,6 +42,8 @@ class URLRequestFilter { static URLRequest::ProtocolFactory Factory; + ~URLRequestFilter(); + void AddHostnameHandler(const std::string& scheme, const std::string& hostname, URLRequest::ProtocolFactory* factory); @@ -62,7 +64,7 @@ class URLRequestFilter { int hit_count() const { return hit_count_; } protected: - URLRequestFilter() : hit_count_(0) { } + URLRequestFilter(); // Helper method that looks up the request in the url_handler_map_. URLRequestJob* FindRequestHandler(URLRequest* request, diff --git a/webkit/fileapi/file_system_path_manager.cc b/webkit/fileapi/file_system_path_manager.cc index 05adafc..b24fb00 100644 --- a/webkit/fileapi/file_system_path_manager.cc +++ b/webkit/fileapi/file_system_path_manager.cc @@ -8,6 +8,7 @@ #include "base/rand_util.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/message_loop_proxy.h" #include "base/scoped_callback_factory.h" #include "base/stringprintf.h" #include "base/string_util.h" @@ -177,6 +178,8 @@ FileSystemPathManager::FileSystemPathManager( allow_file_access_from_files_(allow_file_access_from_files) { } +FileSystemPathManager::~FileSystemPathManager() {} + void FileSystemPathManager::GetFileSystemRootPath( const GURL& origin_url, fileapi::FileSystemType type, bool create, GetRootPathCallback* callback_ptr) { diff --git a/webkit/fileapi/file_system_path_manager.h b/webkit/fileapi/file_system_path_manager.h index f66c02a..99e0bfc 100644 --- a/webkit/fileapi/file_system_path_manager.h +++ b/webkit/fileapi/file_system_path_manager.h @@ -9,11 +9,15 @@ #include "base/callback.h" #include "base/file_path.h" -#include "base/message_loop_proxy.h" #include "base/scoped_ptr.h" -#include "googleurl/src/gurl.h" #include "webkit/fileapi/file_system_types.h" +class GURL; + +namespace base { +class MessageLoopProxy; +} + namespace fileapi { class FileSystemPathManager { @@ -22,6 +26,7 @@ class FileSystemPathManager { const FilePath& profile_path, bool is_incognito, bool allow_file_access_from_files); + ~FileSystemPathManager(); // Callback for GetFileSystemRootPath. // If the request is accepted and the root filesystem for the origin exists diff --git a/webkit/fileapi/file_system_path_manager_unittest.cc b/webkit/fileapi/file_system_path_manager_unittest.cc index 1bb39f3..7fa3672 100644 --- a/webkit/fileapi/file_system_path_manager_unittest.cc +++ b/webkit/fileapi/file_system_path_manager_unittest.cc @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/file_util.h" #include "base/message_loop.h" +#include "base/message_loop_proxy.h" #include "base/ref_counted.h" #include "base/scoped_callback_factory.h" #include "base/scoped_ptr.h" |