diff options
47 files changed, 137 insertions, 78 deletions
diff --git a/base/version.cc b/base/version.cc index 8a09142..22d0e04 100644 --- a/base/version.cc +++ b/base/version.cc @@ -30,6 +30,8 @@ Version* Version::GetVersionFromString(const std::string& version_str) { Version::Version() : is_valid_(false) {} +Version::~Version() {} + bool Version::Equals(const Version& that) const { DCHECK(is_valid_); DCHECK(that.is_valid_); diff --git a/base/version.h b/base/version.h index 99e6650..2b182bb 100644 --- a/base/version.h +++ b/base/version.h @@ -25,7 +25,7 @@ class Version { // will DCHECK. Version(); - ~Version() {} + ~Version(); bool Equals(const Version& other) const; diff --git a/chrome/browser/app_modal_dialog_queue.cc b/chrome/browser/app_modal_dialog_queue.cc index 3abdbad..d3f48d7 100644 --- a/chrome/browser/app_modal_dialog_queue.cc +++ b/chrome/browser/app_modal_dialog_queue.cc @@ -34,6 +34,12 @@ void AppModalDialogQueue::ActivateModalDialog() { active_dialog_->ActivateModalDialog(); } +AppModalDialogQueue::AppModalDialogQueue() + : active_dialog_(NULL), showing_modal_dialog_(false) { +} + +AppModalDialogQueue::~AppModalDialogQueue() {} + void AppModalDialogQueue::ShowModalDialog(AppModalDialog* dialog) { // Be sure and set the active_dialog_ field first, otherwise if // ShowModalDialog triggers a call back to the queue they'll get the old diff --git a/chrome/browser/app_modal_dialog_queue.h b/chrome/browser/app_modal_dialog_queue.h index 78d9142..90298e3 100644 --- a/chrome/browser/app_modal_dialog_queue.h +++ b/chrome/browser/app_modal_dialog_queue.h @@ -55,7 +55,8 @@ class AppModalDialogQueue { private: friend struct DefaultSingletonTraits<AppModalDialogQueue>; - AppModalDialogQueue() : active_dialog_(NULL), showing_modal_dialog_(false) {} + AppModalDialogQueue(); + ~AppModalDialogQueue(); // Shows |dialog| and notifies the BrowserList that a modal dialog is showing. void ShowModalDialog(AppModalDialog* dialog); diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc index e69d413..eb94b8f 100644 --- a/chrome/browser/autocomplete/autocomplete.cc +++ b/chrome/browser/autocomplete/autocomplete.cc @@ -679,6 +679,8 @@ AutocompleteResult::AutocompleteResult() { default_match_ = end(); } +AutocompleteResult::~AutocompleteResult() {} + void AutocompleteResult::CopyFrom(const AutocompleteResult& rhs) { if (this == &rhs) return; diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h index 440f9ec..1509931 100644 --- a/chrome/browser/autocomplete/autocomplete.h +++ b/chrome/browser/autocomplete/autocomplete.h @@ -623,6 +623,7 @@ class AutocompleteResult { }; AutocompleteResult(); + ~AutocompleteResult(); // operator=() by another name. void CopyFrom(const AutocompleteResult& rhs); diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc index 14ab4ff..4f3ee5e 100644 --- a/chrome/browser/autocomplete/keyword_provider.cc +++ b/chrome/browser/autocomplete/keyword_provider.cc @@ -243,6 +243,8 @@ void KeywordProvider::Stop() { MaybeEndExtensionKeywordMode(); } +KeywordProvider::~KeywordProvider() {} + // static bool KeywordProvider::ExtractKeywordFromInput(const AutocompleteInput& input, std::wstring* keyword, diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h index 2d398360..711562a 100644 --- a/chrome/browser/autocomplete/keyword_provider.h +++ b/chrome/browser/autocomplete/keyword_provider.h @@ -76,7 +76,7 @@ class KeywordProvider : public AutocompleteProvider, class ScopedEndExtensionKeywordMode; friend class ScopedEndExtensionKeywordMode; - ~KeywordProvider() {} + virtual ~KeywordProvider(); // Extracts the keyword from |input| into |keyword|. Any remaining characters // after the keyword are placed in |remaining_input|. Returns true if |input| diff --git a/chrome/browser/autofill/address.cc b/chrome/browser/autofill/address.cc index cd5358e..8e75eec 100644 --- a/chrome/browser/autofill/address.cc +++ b/chrome/browser/autofill/address.cc @@ -27,6 +27,10 @@ const int kAutoFillAddressLength = arraysize(kAutoFillAddressTypes); } // namespace +Address::Address() {} + +Address::~Address() {} + void Address::GetPossibleFieldTypes(const string16& text, FieldTypeSet* possible_types) const { DCHECK(possible_types); diff --git a/chrome/browser/autofill/address.h b/chrome/browser/autofill/address.h index 1f826ee..a2b4dd3 100644 --- a/chrome/browser/autofill/address.h +++ b/chrome/browser/autofill/address.h @@ -14,8 +14,8 @@ // A form group that stores address information. class Address : public FormGroup { public: - Address() {} - virtual ~Address() {} + Address(); + virtual ~Address(); // FormGroup implementation: virtual FormGroup* Clone() const = 0; diff --git a/chrome/browser/autofill/autofill_field.cc b/chrome/browser/autofill/autofill_field.cc index 9503f7c..cd41b65 100644 --- a/chrome/browser/autofill/autofill_field.cc +++ b/chrome/browser/autofill/autofill_field.cc @@ -38,6 +38,8 @@ AutoFillField::AutoFillField(const webkit_glue::FormField& field, heuristic_type_(UNKNOWN_TYPE) { } +AutoFillField::~AutoFillField() {} + void AutoFillField::set_heuristic_type(const AutoFillFieldType& type) { DCHECK(type >= 0 && type < MAX_VALID_FIELD_TYPE); if (type >= 0 && type < MAX_VALID_FIELD_TYPE) diff --git a/chrome/browser/autofill/autofill_field.h b/chrome/browser/autofill/autofill_field.h index e2cccfe..3e749f8 100644 --- a/chrome/browser/autofill/autofill_field.h +++ b/chrome/browser/autofill/autofill_field.h @@ -17,6 +17,7 @@ class AutoFillField : public webkit_glue::FormField { AutoFillField(); AutoFillField(const webkit_glue::FormField& field, const string16& unique_name); + virtual ~AutoFillField(); const string16& unique_name() const { return unique_name_; } diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc index 86cb365..98ba665 100644 --- a/chrome/browser/autofill/credit_card.cc +++ b/chrome/browser/autofill/credit_card.cc @@ -125,6 +125,13 @@ std::string GetCreditCardType(const string16& number) { } // namespace +CreditCard::CreditCard() + : expiration_month_(0), + expiration_year_(0), + billing_address_id_(0), + unique_id_(0) { +} + CreditCard::CreditCard(const string16& label, int unique_id) : expiration_month_(0), expiration_year_(0), @@ -137,12 +144,7 @@ CreditCard::CreditCard(const CreditCard& card) : FormGroup() { operator=(card); } -CreditCard::CreditCard() - : expiration_month_(0), - expiration_year_(0), - billing_address_id_(0), - unique_id_(0) { -} +CreditCard::~CreditCard() {} FormGroup* CreditCard::Clone() const { return new CreditCard(*this); diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h index e078ab1..874385f 100644 --- a/chrome/browser/autofill/credit_card.h +++ b/chrome/browser/autofill/credit_card.h @@ -14,10 +14,11 @@ // A form group that stores credit card information. class CreditCard : public FormGroup { public: + CreditCard(); CreditCard(const string16& label, int unique_id); // For use in STL containers. CreditCard(const CreditCard& card); - CreditCard(); + ~CreditCard(); // FormGroup implementation: FormGroup* Clone() const; diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc index 6e018a1..2e89f28 100644 --- a/chrome/browser/autofill/form_structure.cc +++ b/chrome/browser/autofill/form_structure.cc @@ -101,6 +101,8 @@ FormStructure::FormStructure(const FormData& form) } } +FormStructure::~FormStructure() {} + bool FormStructure::EncodeUploadRequest(bool auto_fill_used, std::string* encoded_xml) const { bool auto_fillable = IsAutoFillable(); diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h index bb583dc..7000056 100644 --- a/chrome/browser/autofill/form_structure.h +++ b/chrome/browser/autofill/form_structure.h @@ -36,6 +36,7 @@ enum UploadRequired { class FormStructure { public: explicit FormStructure(const webkit_glue::FormData& form); + ~FormStructure(); // Encodes the XML upload request from this FormStructure. bool EncodeUploadRequest(bool auto_fill_used, diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index a922f06..1cf8243 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -1012,7 +1012,7 @@ int BrowserMain(const MainFunctionParams& parameters) { // On first run, we need to process the predictor preferences before the // browser's profile_manager object is created, but after ResourceBundle // is initialized. - FirstRun::MasterPrefs master_prefs = { 0 }; + FirstRun::MasterPrefs master_prefs; bool first_run_ui_bypass = false; // True to skip first run UI. if (is_first_run) { first_run_ui_bypass = diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc index 88546bd..9c7a1cf 100644 --- a/chrome/browser/extensions/extension_prefs.cc +++ b/chrome/browser/extensions/extension_prefs.cc @@ -122,6 +122,8 @@ ExtensionPrefs::ExtensionPrefs(PrefService* prefs, const FilePath& root_dir) MakePathsRelative(); } +ExtensionPrefs::~ExtensionPrefs() {} + // static const char ExtensionPrefs::kExtensionsPref[] = "extensions.settings"; diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h index 01226cd..98db9dc 100644 --- a/chrome/browser/extensions/extension_prefs.h +++ b/chrome/browser/extensions/extension_prefs.h @@ -37,6 +37,7 @@ class ExtensionPrefs { }; explicit ExtensionPrefs(PrefService* prefs, const FilePath& root_dir_); + ~ExtensionPrefs(); // Returns a copy of the Extensions prefs. // TODO(erikkay) Remove this so that external consumers don't need to be diff --git a/chrome/browser/extensions/extensions_quota_service.cc b/chrome/browser/extensions/extensions_quota_service.cc index de5b926..7a404642 100644 --- a/chrome/browser/extensions/extensions_quota_service.cc +++ b/chrome/browser/extensions/extensions_quota_service.cc @@ -83,6 +83,13 @@ void QuotaLimitHeuristic::Bucket::Reset(const Config& config, expiration_ = start + config.refill_interval; } +QuotaLimitHeuristic::QuotaLimitHeuristic(const Config& config, + BucketMapper* map) + : config_(config), bucket_mapper_(map) { +} + +QuotaLimitHeuristic::~QuotaLimitHeuristic() {} + bool QuotaLimitHeuristic::ApplyToArgs(const ListValue* args, const base::TimeTicks& event_time) { BucketList buckets; diff --git a/chrome/browser/extensions/extensions_quota_service.h b/chrome/browser/extensions/extensions_quota_service.h index c60a5d3..b9880d0 100644 --- a/chrome/browser/extensions/extensions_quota_service.h +++ b/chrome/browser/extensions/extensions_quota_service.h @@ -142,9 +142,8 @@ class QuotaLimitHeuristic { }; // Ownership of |mapper| is given to the new QuotaLimitHeuristic. - explicit QuotaLimitHeuristic(const Config& config, BucketMapper* map) - : config_(config), bucket_mapper_(map) {} - virtual ~QuotaLimitHeuristic() {} + explicit QuotaLimitHeuristic(const Config& config, BucketMapper* map); + virtual ~QuotaLimitHeuristic(); // Determines if sufficient quota exists (according to the Apply // implementation of a derived class) to perform an operation with |args|, diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index 1c5e319..022351b 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -116,6 +116,8 @@ void SandboxedExtensionUnpacker::Start() { } } +SandboxedExtensionUnpacker::~SandboxedExtensionUnpacker() {} + void SandboxedExtensionUnpacker::StartProcessOnIOThread( const FilePath& temp_crx_path) { UtilityProcessHost* host = new UtilityProcessHost( diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.h b/chrome/browser/extensions/sandboxed_extension_unpacker.h index 00ee232..c9de32d 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.h +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.h @@ -105,7 +105,7 @@ class SandboxedExtensionUnpacker : public UtilityProcessHost::Client { friend class ProcessHostClient; friend class SandboxedExtensionUnpackerTest; - ~SandboxedExtensionUnpacker() {} + virtual ~SandboxedExtensionUnpacker(); // Validates the signature of the extension and extract the key to // |public_key_|. Returns true if the signature validates, false otherwise. diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index 6f43ddf..053b933 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -51,6 +51,10 @@ FilePath GetDefaultPrefFilePath(bool create_profile_dir, FirstRun::FirstRunState FirstRun::first_run_ = FIRST_RUN_UNKNOWN; +FirstRun::MasterPrefs::MasterPrefs() {} + +FirstRun::MasterPrefs::~MasterPrefs() {} + // TODO(port): Import switches need to be ported to both Mac and Linux. Not all // import switches here are implemented for Linux. None are implemented for Mac // (as this function will not be called on Mac). @@ -438,6 +442,10 @@ void Upgrade::RelaunchChromeBrowserWithNewCommandLineIfNeeded() { } #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) +FirstRunImportObserver::FirstRunImportObserver() + : loop_running_(false), import_result_(ResultCodes::NORMAL_EXIT) { +} + int FirstRunImportObserver::import_result() const { return import_result_; } diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h index ea6489d..a152a0c 100644 --- a/chrome/browser/first_run/first_run.h +++ b/chrome/browser/first_run/first_run.h @@ -37,8 +37,12 @@ class FirstRun { OEM_BUBBLE, // Smaller bubble for OEM builds MINIMAL_BUBBLE // Minimal bubble shown after search engine dialog } BubbleType; + // See ProcessMasterPreferences for more info about this structure. struct MasterPrefs { + MasterPrefs(); + ~MasterPrefs(); + int ping_delay; bool homepage_defined; int do_import_items; @@ -49,6 +53,7 @@ class FirstRun { std::vector<GURL> new_tabs; std::vector<GURL> bookmarks; }; + #if defined(OS_WIN) // Creates the desktop shortcut to chrome for the current user. Returns // false if it fails. It will overwrite the shortcut if it exists. @@ -292,13 +297,13 @@ class FirstRunBrowserProcess : public BrowserProcessImpl { // The values that it handles are meant to be used as the process exit code. class FirstRunImportObserver : public ImportObserver { public: - FirstRunImportObserver() - : loop_running_(false), import_result_(ResultCodes::NORMAL_EXIT) { - } + FirstRunImportObserver(); + int import_result() const; virtual void ImportCanceled(); virtual void ImportComplete(); void RunLoop(); + private: void Finish(); bool loop_running_; diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc index ff1ae38..99f068ea 100644 --- a/chrome/browser/history/text_database_manager.cc +++ b/chrome/browser/history/text_database_manager.cc @@ -37,6 +37,12 @@ const int kExpirationSec = 20; } // namespace +// TextDatabaseManager::ChangeSet ---------------------------------------------- + +TextDatabaseManager::ChangeSet::ChangeSet() {} + +TextDatabaseManager::ChangeSet::~ChangeSet() {} + // TextDatabaseManager::PageInfo ----------------------------------------------- TextDatabaseManager::PageInfo::PageInfo(URLID url_id, @@ -48,6 +54,8 @@ TextDatabaseManager::PageInfo::PageInfo(URLID url_id, added_time_ = TimeTicks::Now(); } +TextDatabaseManager::PageInfo::~PageInfo() {} + void TextDatabaseManager::PageInfo::set_title(const string16& ttl) { if (ttl.empty()) // Make the title nonempty when we set it for EverybodySet. title_ = ASCIIToUTF16(" "); diff --git a/chrome/browser/history/text_database_manager.h b/chrome/browser/history/text_database_manager.h index 5f8d1a3..673046f 100644 --- a/chrome/browser/history/text_database_manager.h +++ b/chrome/browser/history/text_database_manager.h @@ -55,7 +55,8 @@ class TextDatabaseManager { // our internals. class ChangeSet { public: - ChangeSet() {} + ChangeSet(); + ~ChangeSet(); private: friend class TextDatabaseManager; @@ -173,6 +174,7 @@ class TextDatabaseManager { class PageInfo { public: PageInfo(URLID url_id, VisitID visit_id, base::Time visit_time); + ~PageInfo(); // Getters. URLID url_id() const { return url_id_; } diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc index 1e41f12..acdcb02 100644 --- a/chrome/browser/prefs/session_startup_pref.cc +++ b/chrome/browser/prefs/session_startup_pref.cc @@ -130,3 +130,8 @@ bool SessionStartupPref::URLsAreManaged(PrefService* prefs) { return pref_urls->IsManaged(); } +SessionStartupPref::SessionStartupPref() : type(DEFAULT) {} + +SessionStartupPref::SessionStartupPref(Type type) : type(type) {} + +SessionStartupPref::~SessionStartupPref() {} diff --git a/chrome/browser/prefs/session_startup_pref.h b/chrome/browser/prefs/session_startup_pref.h index d7cfaac..c536da5 100644 --- a/chrome/browser/prefs/session_startup_pref.h +++ b/chrome/browser/prefs/session_startup_pref.h @@ -41,9 +41,11 @@ struct SessionStartupPref { static bool TypeIsManaged(PrefService* prefs); static bool URLsAreManaged(PrefService* prefs); - SessionStartupPref() : type(DEFAULT) {} + SessionStartupPref(); - explicit SessionStartupPref(Type type) : type(type) {} + explicit SessionStartupPref(Type type); + + ~SessionStartupPref(); // What to do on startup. Type type; diff --git a/chrome/common/desktop_notifications/active_notification_tracker.cc b/chrome/common/desktop_notifications/active_notification_tracker.cc index 01f39dd..7bf619c 100644 --- a/chrome/common/desktop_notifications/active_notification_tracker.cc +++ b/chrome/common/desktop_notifications/active_notification_tracker.cc @@ -12,6 +12,10 @@ using WebKit::WebNotification; using WebKit::WebNotificationPermissionCallback; +ActiveNotificationTracker::ActiveNotificationTracker() {} + +ActiveNotificationTracker::~ActiveNotificationTracker() {} + bool ActiveNotificationTracker::GetId( const WebNotification& notification, int& id) { ReverseTable::iterator iter = reverse_notification_table_.find(notification); diff --git a/chrome/common/desktop_notifications/active_notification_tracker.h b/chrome/common/desktop_notifications/active_notification_tracker.h index 07f2d72..2fd8a6a 100644 --- a/chrome/common/desktop_notifications/active_notification_tracker.h +++ b/chrome/common/desktop_notifications/active_notification_tracker.h @@ -22,7 +22,8 @@ class WebNotificationPermissionCallback; // the main thread. class ActiveNotificationTracker { public: - ActiveNotificationTracker() {} + ActiveNotificationTracker(); + ~ActiveNotificationTracker(); // Methods for tracking active notification objects. int RegisterNotification(const WebKit::WebNotification& notification); diff --git a/chrome/common/extensions/update_manifest.cc b/chrome/common/extensions/update_manifest.cc index 0e2d271..45c4549 100644 --- a/chrome/common/extensions/update_manifest.cc +++ b/chrome/common/extensions/update_manifest.cc @@ -18,6 +18,10 @@ static const char* kExpectedGupdateProtocol = "2.0"; static const char* kExpectedGupdateXmlns = "http://www.google.com/update2/response"; +UpdateManifest::Results::Results() {} + +UpdateManifest::Results::~Results() {} + UpdateManifest::UpdateManifest() { results_.daystart_elapsed_seconds = kNoDaystart; } diff --git a/chrome/common/extensions/update_manifest.h b/chrome/common/extensions/update_manifest.h index 7c22d6f..16a4f01 100644 --- a/chrome/common/extensions/update_manifest.h +++ b/chrome/common/extensions/update_manifest.h @@ -45,6 +45,9 @@ class UpdateManifest { static const int kNoDaystart = -1; struct Results { + Results(); + ~Results(); + std::vector<Result> list; // This will be >= 0, or kNoDaystart if the <daystart> tag was not present. int daystart_elapsed_seconds; diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc index cda5809..b6943af9a 100644 --- a/chrome/common/pepper_plugin_registry.cc +++ b/chrome/common/pepper_plugin_registry.cc @@ -18,6 +18,8 @@ PepperPluginInfo::PepperPluginInfo() : is_internal(false) { } +PepperPluginInfo::~PepperPluginInfo() {} + // static PepperPluginRegistry* PepperPluginRegistry::GetInstance() { static PepperPluginRegistry registry; @@ -168,6 +170,8 @@ pepper::PluginModule* PepperPluginRegistry::GetModule( return it->second; } +PepperPluginRegistry::~PepperPluginRegistry() {} + PepperPluginRegistry::PepperPluginRegistry() { InternalPluginInfoList internal_plugin_info; GetInternalPluginInfo(&internal_plugin_info); diff --git a/chrome/common/pepper_plugin_registry.h b/chrome/common/pepper_plugin_registry.h index 9b12f7e..2938729 100644 --- a/chrome/common/pepper_plugin_registry.h +++ b/chrome/common/pepper_plugin_registry.h @@ -15,6 +15,7 @@ struct PepperPluginInfo { PepperPluginInfo(); // Needed to initialize |is_internal|. + ~PepperPluginInfo(); bool is_internal; // Defaults to false (see constructor). FilePath path; // Internal plugins have "internal-[name]" as path. @@ -42,6 +43,8 @@ class PepperPluginRegistry { pepper::PluginModule* GetModule(const FilePath& path) const; + ~PepperPluginRegistry(); + private: static void GetPluginInfoFromSwitch(std::vector<PepperPluginInfo>* plugins); static void GetExtraPlugins(std::vector<PepperPluginInfo>* plugins); diff --git a/chrome/common/sqlite_compiled_statement.cc b/chrome/common/sqlite_compiled_statement.cc index 19b9e53..d5f063e 100644 --- a/chrome/common/sqlite_compiled_statement.cc +++ b/chrome/common/sqlite_compiled_statement.cc @@ -11,6 +11,10 @@ // SqliteStatementCache ------------------------------------------------------- +SqliteStatementCache::SqliteStatementCache() : db_(NULL) {} + +SqliteStatementCache::SqliteStatementCache(sqlite3* db) : db_(db) {} + SqliteStatementCache::~SqliteStatementCache() { STLDeleteContainerPairSecondPointers(statements_.begin(), statements_.end()); statements_.clear(); diff --git a/chrome/common/sqlite_compiled_statement.h b/chrome/common/sqlite_compiled_statement.h index edc60de..81f09a2 100644 --- a/chrome/common/sqlite_compiled_statement.h +++ b/chrome/common/sqlite_compiled_statement.h @@ -21,11 +21,9 @@ class SQLStatement; class SqliteStatementCache { public: // You must call set_db before anything else if you use this constructor. - SqliteStatementCache() : db_(NULL) { - } + SqliteStatementCache(); - explicit SqliteStatementCache(sqlite3* db) : db_(db) { - } + explicit SqliteStatementCache(sqlite3* db); // This object must be deleted before the sqlite connection it is associated // with. Otherwise, sqlite seems to keep the file open because there are open diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index 20005e8..7215e32 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -42,51 +42,6 @@ #include "chrome/renderer/renderer_sandbox_support_linux.h" #endif -template <typename T, size_t stack_capacity> -class ResizableStackArray { - public: - ResizableStackArray() - : cur_buffer_(stack_buffer_), cur_capacity_(stack_capacity) { - } - ~ResizableStackArray() { - FreeHeap(); - } - - T* get() const { - return cur_buffer_; - } - - T& operator[](size_t i) { - return cur_buffer_[i]; - } - - size_t capacity() const { - return cur_capacity_; - } - - void Resize(size_t new_size) { - if (new_size < cur_capacity_) - return; // already big enough - FreeHeap(); - cur_capacity_ = new_size; - cur_buffer_ = new T[new_size]; - } - - private: - // Resets the heap buffer, if any - void FreeHeap() { - if (cur_buffer_ != stack_buffer_) { - delete[] cur_buffer_; - cur_buffer_ = stack_buffer_; - cur_capacity_ = stack_capacity; - } - } - - T stack_buffer_[stack_capacity]; - T* cur_buffer_; - size_t cur_capacity_; -}; - // This definition of WriteBitmapFromPixels uses shared memory to communicate // across processes. void ScopedClipboardWriterGlue::WriteBitmapFromPixels(const void* pixels, diff --git a/net/base/dnsrr_resolver.cc b/net/base/dnsrr_resolver.cc index 0eac805..cd63bc6 100644 --- a/net/base/dnsrr_resolver.cc +++ b/net/base/dnsrr_resolver.cc @@ -92,6 +92,8 @@ RRResponse::RRResponse() : ttl(0), dnssec(false), negative(false) { } +RRResponse::~RRResponse() {} + class RRResolverHandle { public: RRResolverHandle(CompletionCallback* callback, RRResponse* response) diff --git a/net/base/dnsrr_resolver.h b/net/base/dnsrr_resolver.h index b82b298..64a1be5 100644 --- a/net/base/dnsrr_resolver.h +++ b/net/base/dnsrr_resolver.h @@ -26,6 +26,7 @@ namespace net { // RRResponse contains the result of a successful request for a resource record. struct RRResponse { RRResponse(); + ~RRResponse(); // name contains the canonical name of the resulting domain. If the queried // name was a CNAME then this can differ. diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc index fe7005a..a415185 100644 --- a/net/http/http_auth.cc +++ b/net/http/http_auth.cc @@ -18,6 +18,8 @@ namespace net { +HttpAuth::Identity::Identity() : source(IDENT_SRC_NONE), invalid(true) {} + // static void HttpAuth::ChooseBestChallenge( HttpAuthHandlerFactory* http_auth_handler_factory, diff --git a/net/http/http_auth.h b/net/http/http_auth.h index a996304..ff1682b 100644 --- a/net/http/http_auth.h +++ b/net/http/http_auth.h @@ -83,7 +83,7 @@ class HttpAuth { // Helper structure used by HttpNetworkTransaction to track // the current identity being used for authorization. struct Identity { - Identity() : source(IDENT_SRC_NONE), invalid(true) { } + Identity(); IdentitySource source; bool invalid; diff --git a/remoting/jingle_glue/relay_port_allocator.cc b/remoting/jingle_glue/relay_port_allocator.cc index ba9221a..98af60a 100644 --- a/remoting/jingle_glue/relay_port_allocator.cc +++ b/remoting/jingle_glue/relay_port_allocator.cc @@ -11,6 +11,14 @@ namespace remoting { +RelayPortAllocator::RelayPortAllocator( + talk_base::NetworkManager* network_manager, + const std::string& user_agent) + : cricket::HttpPortAllocator(network_manager, user_agent) { +} + +RelayPortAllocator::~RelayPortAllocator() {} + void RelayPortAllocator::OnJingleInfo( const std::string& token, const std::vector<std::string>& relay_hosts, diff --git a/remoting/jingle_glue/relay_port_allocator.h b/remoting/jingle_glue/relay_port_allocator.h index 476e617..0e8f25d 100644 --- a/remoting/jingle_glue/relay_port_allocator.h +++ b/remoting/jingle_glue/relay_port_allocator.h @@ -23,9 +23,8 @@ class RelayPortAllocator : public cricket::HttpPortAllocator, // Caller keeps ownership of |network_manager|. |network_manager| must not // be destroyed before RelayPortAllocator. RelayPortAllocator(talk_base::NetworkManager* network_manager, - const std::string& user_agent) - : cricket::HttpPortAllocator(network_manager, user_agent) { - } + const std::string& user_agent); + virtual ~RelayPortAllocator(); void OnJingleInfo(const std::string& token, const std::vector<std::string>& relay_hosts, diff --git a/remoting/protocol/session_manager_pair.cc b/remoting/protocol/session_manager_pair.cc index 2a1308c..b4cf131 100644 --- a/remoting/protocol/session_manager_pair.cc +++ b/remoting/protocol/session_manager_pair.cc @@ -20,6 +20,8 @@ SessionManagerPair::SessionManagerPair(JingleThread* thread) : message_loop_(thread->message_loop()) { } +SessionManagerPair::~SessionManagerPair() {} + void SessionManagerPair::Init() { DCHECK_EQ(message_loop_, MessageLoop::current()); diff --git a/remoting/protocol/session_manager_pair.h b/remoting/protocol/session_manager_pair.h index 8fe0416..a8f99d2 100644 --- a/remoting/protocol/session_manager_pair.h +++ b/remoting/protocol/session_manager_pair.h @@ -42,6 +42,7 @@ class SessionManagerPair static const char kClientJid[]; SessionManagerPair(JingleThread* thread); + virtual ~SessionManagerPair(); void Init(); diff --git a/webkit/glue/form_field.h b/webkit/glue/form_field.h index 56d8969..fe7aa69 100644 --- a/webkit/glue/form_field.h +++ b/webkit/glue/form_field.h @@ -22,7 +22,7 @@ class FormField { const string16& value, const string16& form_control_type, int size); - ~FormField(); + virtual ~FormField(); const string16& label() const { return label_; } const string16& name() const { return name_; } |