diff options
77 files changed, 532 insertions, 187 deletions
diff --git a/app/os_exchange_data.cc b/app/os_exchange_data.cc index 8081f37..a09bb83 100644 --- a/app/os_exchange_data.cc +++ b/app/os_exchange_data.cc @@ -7,6 +7,15 @@ #include "base/pickle.h" #include "googleurl/src/gurl.h" +OSExchangeData::DownloadFileInfo::DownloadFileInfo( + const FilePath& filename, + DownloadFileProvider* downloader) + : filename(filename), + downloader(downloader) { +} + +OSExchangeData::DownloadFileInfo::~DownloadFileInfo() {} + OSExchangeData::OSExchangeData() : provider_(CreateProvider()) { } diff --git a/app/os_exchange_data.h b/app/os_exchange_data.h index 7a76198..e2b06cc 100644 --- a/app/os_exchange_data.h +++ b/app/os_exchange_data.h @@ -63,12 +63,12 @@ class OSExchangeData { // Encapsulates the info about a file to be downloaded. struct DownloadFileInfo { + DownloadFileInfo(const FilePath& filename, + DownloadFileProvider* downloader); + ~DownloadFileInfo(); + FilePath filename; scoped_refptr<DownloadFileProvider> downloader; - - DownloadFileInfo(const FilePath& filename, DownloadFileProvider* downloader) - : filename(filename), - downloader(downloader) {} }; // Provider defines the platform specific part of OSExchangeData that diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc index 4e329cd..cdd4f7e 100644 --- a/chrome/browser/alternate_nav_url_fetcher.cc +++ b/chrome/browser/alternate_nav_url_fetcher.cc @@ -30,6 +30,8 @@ AlternateNavURLFetcher::AlternateNavURLFetcher( NotificationService::AllSources()); } +AlternateNavURLFetcher::~AlternateNavURLFetcher() {} + void AlternateNavURLFetcher::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/alternate_nav_url_fetcher.h b/chrome/browser/alternate_nav_url_fetcher.h index e888d07..785f34a 100644 --- a/chrome/browser/alternate_nav_url_fetcher.h +++ b/chrome/browser/alternate_nav_url_fetcher.h @@ -39,6 +39,7 @@ class AlternateNavURLFetcher : public NotificationObserver, }; explicit AlternateNavURLFetcher(const GURL& alternate_nav_url); + virtual ~AlternateNavURLFetcher(); State state() const { return state_; } diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc index f86e5db..30d63fb 100644 --- a/chrome/browser/autocomplete/history_url_provider.cc +++ b/chrome/browser/autocomplete/history_url_provider.cc @@ -113,6 +113,8 @@ HistoryURLProviderParams::HistoryURLProviderParams( languages(languages) { } +HistoryURLProviderParams::~HistoryURLProviderParams() {} + HistoryURLProvider::HistoryURLProvider(ACProviderListener* listener, Profile* profile) : HistoryProvider(listener, profile, "HistoryURL"), diff --git a/chrome/browser/autocomplete/history_url_provider.h b/chrome/browser/autocomplete/history_url_provider.h index 16b0346..58c4c25 100644 --- a/chrome/browser/autocomplete/history_url_provider.h +++ b/chrome/browser/autocomplete/history_url_provider.h @@ -86,6 +86,7 @@ struct HistoryURLProviderParams { HistoryURLProviderParams(const AutocompleteInput& input, bool trim_http, const std::string& languages); + ~HistoryURLProviderParams(); MessageLoop* message_loop; diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc index ec93530..bdb082c 100644 --- a/chrome/browser/automation/automation_resource_message_filter.cc +++ b/chrome/browser/automation/automation_resource_message_filter.cc @@ -82,6 +82,22 @@ class AutomationCookieStore : public net::CookieStore { DISALLOW_COPY_AND_ASSIGN(AutomationCookieStore); }; +AutomationResourceMessageFilter::AutomationDetails::AutomationDetails() + : tab_handle(0), + ref_count(1), + is_pending_render_view(false) { +} + +AutomationResourceMessageFilter::AutomationDetails::AutomationDetails( + int tab, + AutomationResourceMessageFilter* flt, + bool pending_view) + : tab_handle(tab), ref_count(1), filter(flt), + is_pending_render_view(pending_view) { +} + +AutomationResourceMessageFilter::AutomationDetails::~AutomationDetails() {} + struct AutomationResourceMessageFilter::CookieCompletionInfo { net::CompletionCallback* completion_callback; scoped_refptr<net::CookieStore> cookie_store; diff --git a/chrome/browser/automation/automation_resource_message_filter.h b/chrome/browser/automation/automation_resource_message_filter.h index a30825f..82081ec 100644 --- a/chrome/browser/automation/automation_resource_message_filter.h +++ b/chrome/browser/automation/automation_resource_message_filter.h @@ -34,13 +34,10 @@ class AutomationResourceMessageFilter public: // Information needed to send IPCs through automation. struct AutomationDetails { - AutomationDetails() : tab_handle(0), ref_count(1), - is_pending_render_view(false) {} + AutomationDetails(); AutomationDetails(int tab, AutomationResourceMessageFilter* flt, - bool pending_view) - : tab_handle(tab), ref_count(1), filter(flt), - is_pending_render_view(pending_view) { - } + bool pending_view); + ~AutomationDetails(); void set_cookie_store(net::CookieStore* cookie_store) { cookie_store_ = cookie_store; diff --git a/chrome/browser/cross_site_request_manager.cc b/chrome/browser/cross_site_request_manager.cc index 427c259..4104398 100644 --- a/chrome/browser/cross_site_request_manager.cc +++ b/chrome/browser/cross_site_request_manager.cc @@ -25,3 +25,7 @@ void CrossSiteRequestManager::SetHasPendingCrossSiteRequest(int renderer_id, pending_cross_site_views_.erase(key); } } + +CrossSiteRequestManager::CrossSiteRequestManager() {} + +CrossSiteRequestManager::~CrossSiteRequestManager() {} diff --git a/chrome/browser/cross_site_request_manager.h b/chrome/browser/cross_site_request_manager.h index d3c4dd6..84d07e9 100644 --- a/chrome/browser/cross_site_request_manager.h +++ b/chrome/browser/cross_site_request_manager.h @@ -40,7 +40,8 @@ class CrossSiteRequestManager { // Obtain an instance of CrossSiteRequestManager via // Singleton<CrossSiteRequestManager>(). - CrossSiteRequestManager() {} + CrossSiteRequestManager(); + ~CrossSiteRequestManager(); // You must acquire this lock before reading or writing any members of this // class. You must not block while holding this lock. diff --git a/chrome/browser/download/save_types.cc b/chrome/browser/download/save_types.cc new file mode 100644 index 0000000..d65b4d7 --- /dev/null +++ b/chrome/browser/download/save_types.cc @@ -0,0 +1,31 @@ +// 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 "chrome/browser/download/save_types.h" + + +SaveFileCreateInfo::SaveFileCreateInfo(const FilePath& path, + const GURL& url, + SaveFileSource save_source, + int32 save_id) + : path(path), + url(url), + save_id(save_id), + render_process_id(-1), + render_view_id(-1), + request_id(-1), + total_bytes(0), + save_source(save_source) { +} + +SaveFileCreateInfo::SaveFileCreateInfo() + : save_id(-1), + render_process_id(-1), + render_view_id(-1), + request_id(-1), + total_bytes(0), + save_source(SAVE_FILE_FROM_UNKNOWN) { +} + +SaveFileCreateInfo::~SaveFileCreateInfo() {} diff --git a/chrome/browser/download/save_types.h b/chrome/browser/download/save_types.h index d046b5b..8295106 100644 --- a/chrome/browser/download/save_types.h +++ b/chrome/browser/download/save_types.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// 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. @@ -36,25 +36,11 @@ struct SaveFileCreateInfo { SaveFileCreateInfo(const FilePath& path, const GURL& url, SaveFileSource save_source, - int32 save_id) - : path(path), - url(url), - save_id(save_id), - render_process_id(-1), - render_view_id(-1), - request_id(-1), - total_bytes(0), - save_source(save_source) { - } + int32 save_id); - SaveFileCreateInfo() - : save_id(-1), - render_process_id(-1), - render_view_id(-1), - request_id(-1), - total_bytes(0), - save_source(SAVE_FILE_FROM_UNKNOWN) { - } + SaveFileCreateInfo(); + + ~SaveFileCreateInfo(); // SaveItem fields. // The local file path of saved file. diff --git a/chrome/browser/extensions/extension_error_reporter.cc b/chrome/browser/extensions/extension_error_reporter.cc index 00ffb85..a059725 100644 --- a/chrome/browser/extensions/extension_error_reporter.cc +++ b/chrome/browser/extensions/extension_error_reporter.cc @@ -36,6 +36,8 @@ ExtensionErrorReporter::ExtensionErrorReporter(bool enable_noisy_errors) enable_noisy_errors_(enable_noisy_errors) { } +ExtensionErrorReporter::~ExtensionErrorReporter() {} + void ExtensionErrorReporter::ReportError(const std::string& message, bool be_noisy) { // NOTE: There won't be a ui_loop_ in the unit test environment. diff --git a/chrome/browser/extensions/extension_error_reporter.h b/chrome/browser/extensions/extension_error_reporter.h index 824ac9e..2866211 100644 --- a/chrome/browser/extensions/extension_error_reporter.h +++ b/chrome/browser/extensions/extension_error_reporter.h @@ -42,6 +42,7 @@ class ExtensionErrorReporter { static ExtensionErrorReporter* instance_; explicit ExtensionErrorReporter(bool enable_noisy_errors); + ~ExtensionErrorReporter(); MessageLoop* ui_loop_; std::vector<std::string> errors_; diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc index a5da1fb..6d9e4e4 100644 --- a/chrome/browser/extensions/extension_omnibox_api.cc +++ b/chrome/browser/extensions/extension_omnibox_api.cc @@ -158,3 +158,12 @@ bool OmniboxSendSuggestionsFunction::RunImpl() { return true; } + +ExtensionOmniboxSuggestion::ExtensionOmniboxSuggestion() {} + +ExtensionOmniboxSuggestion::~ExtensionOmniboxSuggestion() {} + +ExtensionOmniboxSuggestions::ExtensionOmniboxSuggestions() {} + +ExtensionOmniboxSuggestions::~ExtensionOmniboxSuggestions() {} + diff --git a/chrome/browser/extensions/extension_omnibox_api.h b/chrome/browser/extensions/extension_omnibox_api.h index a648e67..538ce85 100644 --- a/chrome/browser/extensions/extension_omnibox_api.h +++ b/chrome/browser/extensions/extension_omnibox_api.h @@ -46,6 +46,9 @@ class OmniboxSendSuggestionsFunction : public SyncExtensionFunction { }; struct ExtensionOmniboxSuggestion { + ExtensionOmniboxSuggestion(); + ~ExtensionOmniboxSuggestion(); + // The text that gets put in the edit box. string16 content; @@ -57,8 +60,15 @@ struct ExtensionOmniboxSuggestion { }; struct ExtensionOmniboxSuggestions { + ExtensionOmniboxSuggestions(); + ~ExtensionOmniboxSuggestions(); + int request_id; std::vector<ExtensionOmniboxSuggestion> suggestions; + + private: + // This class is passed around by pointer. + DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxSuggestions); }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index fc71437..f4e9e94 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -167,6 +167,8 @@ ManifestFetchesBuilder::ManifestFetchesBuilder( DCHECK(service_); } +ManifestFetchesBuilder::~ManifestFetchesBuilder() {} + void ManifestFetchesBuilder::AddExtension(const Extension& extension) { // Skip extensions with empty update URLs converted from user // scripts. diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h index 6f646e1..4540dd0 100644 --- a/chrome/browser/extensions/extension_updater.h +++ b/chrome/browser/extensions/extension_updater.h @@ -82,6 +82,7 @@ class ManifestFetchData { class ManifestFetchesBuilder { public: explicit ManifestFetchesBuilder(ExtensionUpdateService* service); + ~ManifestFetchesBuilder(); void AddExtension(const Extension& extension); diff --git a/chrome/browser/file_system/browser_file_system_callback_dispatcher.cc b/chrome/browser/file_system/browser_file_system_callback_dispatcher.cc index 1d2ec0a..756bef7 100644 --- a/chrome/browser/file_system/browser_file_system_callback_dispatcher.cc +++ b/chrome/browser/file_system/browser_file_system_callback_dispatcher.cc @@ -14,6 +14,8 @@ BrowserFileSystemCallbackDispatcher::BrowserFileSystemCallbackDispatcher( DCHECK(dispatcher_host_); } +BrowserFileSystemCallbackDispatcher::~BrowserFileSystemCallbackDispatcher() {} + void BrowserFileSystemCallbackDispatcher::DidSucceed() { dispatcher_host_->Send(new ViewMsg_FileSystem_DidSucceed(request_id_)); dispatcher_host_->RemoveCompletedOperation(request_id_); diff --git a/chrome/browser/file_system/browser_file_system_callback_dispatcher.h b/chrome/browser/file_system/browser_file_system_callback_dispatcher.h index f24ce71..3220577 100644 --- a/chrome/browser/file_system/browser_file_system_callback_dispatcher.h +++ b/chrome/browser/file_system/browser_file_system_callback_dispatcher.h @@ -14,6 +14,7 @@ class BrowserFileSystemCallbackDispatcher public: BrowserFileSystemCallbackDispatcher(FileSystemDispatcherHost* dispatcher_host, int request_id); + virtual ~BrowserFileSystemCallbackDispatcher(); // FileSystemCallbackDispatcher implementation. virtual void DidSucceed(); diff --git a/chrome/browser/geolocation/geolocation_exceptions_table_model.cc b/chrome/browser/geolocation/geolocation_exceptions_table_model.cc index 2494465..7095e53 100644 --- a/chrome/browser/geolocation/geolocation_exceptions_table_model.cc +++ b/chrome/browser/geolocation/geolocation_exceptions_table_model.cc @@ -47,6 +47,20 @@ int CompareOrigins(const GURL& origin1, const GURL& origin2) { } } // namespace +struct GeolocationExceptionsTableModel::Entry { + Entry(const GURL& in_origin, + const GURL& in_embedding_origin, + ContentSetting in_setting) + : origin(in_origin), + embedding_origin(in_embedding_origin), + setting(in_setting) { + } + + GURL origin; + GURL embedding_origin; + ContentSetting setting; +}; + GeolocationExceptionsTableModel::GeolocationExceptionsTableModel( GeolocationContentSettingsMap* map) : map_(map), @@ -58,6 +72,8 @@ GeolocationExceptionsTableModel::GeolocationExceptionsTableModel( AddEntriesForOrigin(i->first, i->second); } +GeolocationExceptionsTableModel::~GeolocationExceptionsTableModel() {} + bool GeolocationExceptionsTableModel::CanRemoveRows( const Rows& rows) const { for (Rows::const_iterator i(rows.begin()); i != rows.end(); ++i) { @@ -237,11 +253,3 @@ void GeolocationExceptionsTableModel::AddEntriesForOrigin( entries_.push_back(Entry(origin, i->first, i->second)); } } - -GeolocationExceptionsTableModel::Entry::Entry(const GURL& in_origin, - const GURL& in_embedding_origin, - ContentSetting in_setting) - : origin(in_origin), - embedding_origin(in_embedding_origin), - setting(in_setting) { -} diff --git a/chrome/browser/geolocation/geolocation_exceptions_table_model.h b/chrome/browser/geolocation/geolocation_exceptions_table_model.h index 937bbd8..09014b4 100644 --- a/chrome/browser/geolocation/geolocation_exceptions_table_model.h +++ b/chrome/browser/geolocation/geolocation_exceptions_table_model.h @@ -17,6 +17,7 @@ class GeolocationExceptionsTableModel : public RemoveRowsTableModel { public: explicit GeolocationExceptionsTableModel( GeolocationContentSettingsMap* map); + virtual ~GeolocationExceptionsTableModel(); // RemoveRowsTableModel overrides: @@ -42,22 +43,13 @@ class GeolocationExceptionsTableModel : public RemoveRowsTableModel { virtual int CompareValues(int row1, int row2, int column_id); private: - struct Entry { - Entry(const GURL& origin, - const GURL& embedding_origin, - ContentSetting setting); - - GURL origin; - GURL embedding_origin; - ContentSetting setting; - }; - void AddEntriesForOrigin( const GURL& origin, const GeolocationContentSettingsMap::OneOriginSettings& settings); GeolocationContentSettingsMap* map_; + struct Entry; typedef std::vector<Entry> EntriesVector; EntriesVector entries_; diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index 248d8d4..a33ef5c 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -12,6 +12,7 @@ #include "chrome/browser/gpu_process_host_ui_shim.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" +#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/common/child_process_logging.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/gpu_info.h" @@ -173,6 +174,21 @@ GPUInfo GpuProcessHost::gpu_info() const { return gpu_info_; } +GpuProcessHost::ChannelRequest::ChannelRequest(ResourceMessageFilter* filter) + : filter(filter) { +} + +GpuProcessHost::ChannelRequest::~ChannelRequest() {} + +GpuProcessHost::SynchronizationRequest::SynchronizationRequest( + IPC::Message* reply, + ResourceMessageFilter* filter) + : reply(reply), + filter(filter) { +} + +GpuProcessHost::SynchronizationRequest::~SynchronizationRequest() {} + void GpuProcessHost::OnControlMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message) IPC_MESSAGE_HANDLER(GpuHostMsg_ChannelEstablished, OnChannelEstablished) diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h index a5268ba..0e14402 100644 --- a/chrome/browser/gpu_process_host.h +++ b/chrome/browser/gpu_process_host.h @@ -11,12 +11,12 @@ #include "base/basictypes.h" #include "base/ref_counted.h" #include "chrome/browser/browser_child_process_host.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/common/gpu_info.h" #include "gfx/native_widget_types.h" struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; class GPUInfo; +class ResourceMessageFilter; namespace IPC { struct ChannelHandle; @@ -61,8 +61,9 @@ class GpuProcessHost : public BrowserChildProcessHost { private: // Used to queue pending channel requests. struct ChannelRequest { - explicit ChannelRequest(ResourceMessageFilter* filter) - : filter(filter) {} + explicit ChannelRequest(ResourceMessageFilter* filter); + ~ChannelRequest(); + // Used to send the reply message back to the renderer. scoped_refptr<ResourceMessageFilter> filter; }; @@ -70,9 +71,9 @@ class GpuProcessHost : public BrowserChildProcessHost { // Used to queue pending synchronization requests. struct SynchronizationRequest { SynchronizationRequest(IPC::Message* reply, - ResourceMessageFilter* filter) - : reply(reply), - filter(filter) {} + ResourceMessageFilter* filter); + ~SynchronizationRequest(); + // The delayed reply message which needs to be sent to the // renderer. IPC::Message* reply; diff --git a/chrome/browser/gtk/accelerators_gtk.cc b/chrome/browser/gtk/accelerators_gtk.cc index f73d03a..9d7a5b9 100644 --- a/chrome/browser/gtk/accelerators_gtk.cc +++ b/chrome/browser/gtk/accelerators_gtk.cc @@ -188,6 +188,8 @@ AcceleratorsGtk::AcceleratorsGtk() { } } +AcceleratorsGtk::~AcceleratorsGtk() {} + const menus::AcceleratorGtk* AcceleratorsGtk::GetPrimaryAcceleratorForCommand( int command_id) { base::hash_map<int, menus::AcceleratorGtk>::const_iterator iter = diff --git a/chrome/browser/gtk/accelerators_gtk.h b/chrome/browser/gtk/accelerators_gtk.h index de08f914..1ea7ce4 100644 --- a/chrome/browser/gtk/accelerators_gtk.h +++ b/chrome/browser/gtk/accelerators_gtk.h @@ -12,7 +12,7 @@ class AcceleratorsGtk { public: AcceleratorsGtk(); - ~AcceleratorsGtk() { } + ~AcceleratorsGtk(); typedef std::vector<std::pair<int, menus::AcceleratorGtk> > AcceleratorGtkList; diff --git a/chrome/browser/gtk/gconf_titlebar_listener.cc b/chrome/browser/gtk/gconf_titlebar_listener.cc index 671c197b..81b5ef0 100644 --- a/chrome/browser/gtk/gconf_titlebar_listener.cc +++ b/chrome/browser/gtk/gconf_titlebar_listener.cc @@ -42,6 +42,10 @@ void GConfTitlebarListener::RemoveObserver(BrowserTitlebar* titlebar) { titlebars_.erase(titlebar); } +// Protected: + +GConfTitlebarListener::~GConfTitlebarListener() {} + // Private: GConfTitlebarListener::GConfTitlebarListener() : client_(NULL) { diff --git a/chrome/browser/gtk/gconf_titlebar_listener.h b/chrome/browser/gtk/gconf_titlebar_listener.h index 4b37588..19318eb 100644 --- a/chrome/browser/gtk/gconf_titlebar_listener.h +++ b/chrome/browser/gtk/gconf_titlebar_listener.h @@ -33,7 +33,7 @@ class GConfTitlebarListener { void RemoveObserver(BrowserTitlebar* titlebar); protected: - virtual ~GConfTitlebarListener() {} + virtual ~GConfTitlebarListener(); private: // Private constructor to enforce singleton access. diff --git a/chrome/browser/gtk/import_lock_dialog_gtk.cc b/chrome/browser/gtk/import_lock_dialog_gtk.cc index 02c4b8d..8fcaefe 100644 --- a/chrome/browser/gtk/import_lock_dialog_gtk.cc +++ b/chrome/browser/gtk/import_lock_dialog_gtk.cc @@ -40,11 +40,13 @@ ImportLockDialogGtk::ImportLockDialogGtk(GtkWindow* parent, gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0); g_signal_connect(dialog_, "response", - G_CALLBACK(HandleOnResponseDialog), this); + G_CALLBACK(OnDialogResponseThunk), this); gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); gtk_widget_show_all(dialog_); } +ImportLockDialogGtk::~ImportLockDialogGtk() {} + void ImportLockDialogGtk::OnDialogResponse(GtkWidget* widget, int response) { if (response == GTK_RESPONSE_ACCEPT) { MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( diff --git a/chrome/browser/gtk/import_lock_dialog_gtk.h b/chrome/browser/gtk/import_lock_dialog_gtk.h index 96f9b13..e22e823 100644 --- a/chrome/browser/gtk/import_lock_dialog_gtk.h +++ b/chrome/browser/gtk/import_lock_dialog_gtk.h @@ -8,6 +8,7 @@ #include <gtk/gtk.h> +#include "app/gtk_signal.h" #include "base/basictypes.h" #include "base/ref_counted.h" @@ -20,15 +21,9 @@ class ImportLockDialogGtk { private: ImportLockDialogGtk(GtkWindow* parent, ImporterHost* importer_host); - ~ImportLockDialogGtk() { } - - static void HandleOnResponseDialog(GtkWidget* widget, - int response, - gpointer user_data) { - reinterpret_cast<ImportLockDialogGtk*>(user_data)->OnDialogResponse( - widget, response); - } - void OnDialogResponse(GtkWidget* widget, int response); + ~ImportLockDialogGtk(); + + CHROMEGTK_CALLBACK_1(ImportLockDialogGtk, void, OnDialogResponse, int); // Dialog box GtkWidget* dialog_; diff --git a/chrome/browser/gtk/import_progress_dialog_gtk.cc b/chrome/browser/gtk/import_progress_dialog_gtk.cc index 7e0e297..b405b13 100644 --- a/chrome/browser/gtk/import_progress_dialog_gtk.cc +++ b/chrome/browser/gtk/import_progress_dialog_gtk.cc @@ -189,6 +189,8 @@ ImportProgressDialogGtk::ImportProgressDialogGtk(const string16& source_profile, gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); } +ImportProgressDialogGtk::~ImportProgressDialogGtk() {} + void ImportProgressDialogGtk::CloseDialog() { gtk_widget_destroy(dialog_); dialog_ = NULL; diff --git a/chrome/browser/gtk/import_progress_dialog_gtk.h b/chrome/browser/gtk/import_progress_dialog_gtk.h index d7a6408..360b0de 100644 --- a/chrome/browser/gtk/import_progress_dialog_gtk.h +++ b/chrome/browser/gtk/import_progress_dialog_gtk.h @@ -32,7 +32,7 @@ class ImportProgressDialogGtk : public ImporterHost::Observer { ImportProgressDialogGtk(const string16& source_profile, int16 items, ImporterHost* importer_host, ImportObserver* observer, GtkWindow* parent, bool bookmarks_import); - ~ImportProgressDialogGtk() { } + virtual ~ImportProgressDialogGtk(); static void HandleOnResponseDialog(GtkWidget* widget, int response, diff --git a/chrome/browser/history/history_notifications.cc b/chrome/browser/history/history_notifications.cc new file mode 100644 index 0000000..c846eaf --- /dev/null +++ b/chrome/browser/history/history_notifications.cc @@ -0,0 +1,31 @@ +// 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 "chrome/browser/history/history_notifications.h" + +namespace history { + +URLVisitedDetails::URLVisitedDetails() : transition(PageTransition::LINK) {} + +URLVisitedDetails::~URLVisitedDetails() {} + +URLsModifiedDetails::URLsModifiedDetails() {} + +URLsModifiedDetails::~URLsModifiedDetails() {} + +URLsDeletedDetails::URLsDeletedDetails() : all_history(false) {} + +URLsDeletedDetails::~URLsDeletedDetails() {} + +URLsStarredDetails::URLsStarredDetails(bool being_starred) + : starred(being_starred) { +} + +URLsStarredDetails::~URLsStarredDetails() {} + +FavIconChangeDetails::FavIconChangeDetails() {} + +FavIconChangeDetails::~FavIconChangeDetails() {} + +} // namespace history diff --git a/chrome/browser/history/history_notifications.h b/chrome/browser/history/history_notifications.h index 3957041..7a2404c 100644 --- a/chrome/browser/history/history_notifications.h +++ b/chrome/browser/history/history_notifications.h @@ -26,6 +26,9 @@ struct HistoryDetails { // Details for HISTORY_URL_VISITED. struct URLVisitedDetails : public HistoryDetails { + URLVisitedDetails(); + ~URLVisitedDetails(); + PageTransition::Type transition; URLRow row; @@ -38,12 +41,18 @@ struct URLVisitedDetails : public HistoryDetails { // Details for NOTIFY_HISTORY_TYPED_URLS_MODIFIED. struct URLsModifiedDetails : public HistoryDetails { + URLsModifiedDetails(); + ~URLsModifiedDetails(); + // Lists the information for each of the URLs affected. std::vector<URLRow> changed_urls; }; // Details for NOTIFY_HISTORY_URLS_DELETED. struct URLsDeletedDetails : public HistoryDetails { + URLsDeletedDetails(); + ~URLsDeletedDetails(); + // Set when all history was deleted. False means just a subset was deleted. bool all_history; @@ -55,7 +64,8 @@ struct URLsDeletedDetails : public HistoryDetails { // Details for NOTIFY_URLS_STARRED. struct URLsStarredDetails : public HistoryDetails { - explicit URLsStarredDetails(bool being_starred) : starred(being_starred) {} + explicit URLsStarredDetails(bool being_starred); + ~URLsStarredDetails(); // The new starred state of the list of URLs. True when they are being // starred, false when they are being unstarred. @@ -67,6 +77,9 @@ struct URLsStarredDetails : public HistoryDetails { // Details for NOTIFY_FAVICON_CHANGED. struct FavIconChangeDetails : public HistoryDetails { + FavIconChangeDetails(); + ~FavIconChangeDetails(); + std::set<GURL> urls; }; diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc index 8b68971..654afdc 100644 --- a/chrome/browser/history/in_memory_url_index.cc +++ b/chrome/browser/history/in_memory_url_index.cc @@ -477,6 +477,15 @@ Time InMemoryURLIndex::RecentThreshold() { return Time::Now() - TimeDelta::FromDays(kLowQualityMatchAgeLimitInDays); } +InMemoryURLIndex::AddHistoryMatch::AddHistoryMatch( + const InMemoryURLIndex& index, + const String16Vector& lower_terms) + : index_(index), + lower_terms_(lower_terms) { +} + +InMemoryURLIndex::AddHistoryMatch::~AddHistoryMatch() {} + void InMemoryURLIndex::AddHistoryMatch::operator()( const InMemoryURLIndex::HistoryID history_id) { HistoryInfoMap::const_iterator hist_pos = diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h index 6993e0d..a2ac0f3 100644 --- a/chrome/browser/history/in_memory_url_index.h +++ b/chrome/browser/history/in_memory_url_index.h @@ -132,12 +132,11 @@ class InMemoryURLIndex { // A helper class which performs the final filter on each candidate // history URL match, inserting accepted matches into |scored_matches_| // and trimming the maximum number of matches to 10. - class AddHistoryMatch : std::unary_function<HistoryID, void> { + class AddHistoryMatch : public std::unary_function<HistoryID, void> { public: AddHistoryMatch(const InMemoryURLIndex& index, - const String16Vector& lower_terms) - : index_(index), - lower_terms_(lower_terms) {} + const String16Vector& lower_terms); + ~AddHistoryMatch(); void operator()(const HistoryID history_id); diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index 93bba8f..92637d0 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -35,6 +35,17 @@ using importer::ProfileInfo; using importer::SEARCH_ENGINES; using webkit_glue::PasswordForm; +struct Firefox3Importer::BookmarkItem { + int parent; + int id; + GURL url; + std::wstring title; + int type; + std::string keyword; + base::Time date_added; + int64 favicon; +}; + Firefox3Importer::Firefox3Importer() { #if defined(OS_LINUX) DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/importer/firefox3_importer.h b/chrome/browser/importer/firefox3_importer.h index 592d4da..362f710 100644 --- a/chrome/browser/importer/firefox3_importer.h +++ b/chrome/browser/importer/firefox3_importer.h @@ -46,16 +46,7 @@ class Firefox3Importer : public Importer { void GetSearchEnginesXMLFiles(std::vector<FilePath>* files); // The struct stores the information about a bookmark item. - struct BookmarkItem { - int parent; - int id; - GURL url; - std::wstring title; - int type; - std::string keyword; - base::Time date_added; - int64 favicon; - }; + struct BookmarkItem; typedef std::vector<BookmarkItem*> BookmarkList; // Gets the specific IDs of bookmark root node from |db|. diff --git a/chrome/browser/language_combobox_model.cc b/chrome/browser/language_combobox_model.cc index 216fed1..ceb8fb4 100644 --- a/chrome/browser/language_combobox_model.cc +++ b/chrome/browser/language_combobox_model.cc @@ -32,6 +32,8 @@ LanguageList::LanguageList( InitNativeNames(locale_codes); } +LanguageList::~LanguageList() {} + void LanguageList::InitNativeNames( const std::vector<std::string>& locale_codes) { const std::string app_locale = g_browser_process->GetApplicationLocale(); @@ -152,6 +154,8 @@ LanguageComboboxModel::LanguageComboboxModel( profile_(profile) { } +LanguageComboboxModel::~LanguageComboboxModel() {} + int LanguageComboboxModel::GetItemCount() { return get_languages_count(); } diff --git a/chrome/browser/language_combobox_model.h b/chrome/browser/language_combobox_model.h index 469fa2b..a3fdf77 100644 --- a/chrome/browser/language_combobox_model.h +++ b/chrome/browser/language_combobox_model.h @@ -36,7 +36,7 @@ class LanguageList { explicit LanguageList(const std::vector<std::string>& locale_codes); - virtual ~LanguageList() {} + virtual ~LanguageList(); // Duplicates specified languages at the beginning of the list for // easier access. @@ -76,7 +76,7 @@ class LanguageComboboxModel : public LanguageList, public ComboboxModel { LanguageComboboxModel(Profile* profile, const std::vector<std::string>& locale_codes); - virtual ~LanguageComboboxModel() {} + virtual ~LanguageComboboxModel(); virtual int GetItemCount(); virtual string16 GetItemAt(int index); diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index 0318219..b728543 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc @@ -33,6 +33,23 @@ ProcessMemoryInformation::ProcessMemoryInformation() ProcessMemoryInformation::~ProcessMemoryInformation() {} +ProcessData::ProcessData() {} + +ProcessData::ProcessData(const ProcessData& rhs) + : name(rhs.name), + process_name(rhs.process_name), + processes(rhs.processes) { +} + +ProcessData::~ProcessData() {} + +ProcessData& ProcessData::operator=(const ProcessData& rhs) { + name = rhs.name; + process_name = rhs.process_name; + processes = rhs.processes; + return *this; +} + // About threading: // // This operation will hit no fewer than 3 threads. diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h index 1513ab4..2b152b6 100644 --- a/chrome/browser/memory_details.h +++ b/chrome/browser/memory_details.h @@ -44,6 +44,11 @@ typedef std::vector<ProcessMemoryInformation> ProcessMemoryInformationList; // Browser Process Information. struct ProcessData { + ProcessData(); + ProcessData(const ProcessData& rhs); + ~ProcessData(); + ProcessData& operator=(const ProcessData& rhs); + std::wstring name; std::wstring process_name; ProcessMemoryInformationList processes; diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index dd68419..399049e 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -61,7 +61,10 @@ MemoryDetails::MemoryDetails() { // Chrome and Chromium at the same time! // TODO(viettrungluu): Get localized browser names for other browsers // (crbug.com/25779). - ProcessData process_template[MAX_BROWSERS] = { + struct { + const wchar_t* name; + const wchar_t* process_name; + } process_template[MAX_BROWSERS] = { { google_browser_name.c_str(), chrome::kBrowserProcessExecutableName, }, { L"Safari", L"Safari", }, { L"Firefox", L"firefox-bin", }, @@ -70,7 +73,7 @@ MemoryDetails::MemoryDetails() { { L"OmniWeb", L"OmniWeb", }, }; - for (size_t index = 0; index < arraysize(process_template); ++index) { + for (size_t index = 0; index < MAX_BROWSERS; ++index) { ProcessData process; process.name = process_template[index].name; process.process_name = process_template[index].process_name; diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc index 32a2282..045321f 100644 --- a/chrome/browser/memory_details_win.cc +++ b/chrome/browser/memory_details_win.cc @@ -32,14 +32,13 @@ enum { MAX_BROWSERS } BrowserProcess; -// Template of static data we use for finding browser process information. -// These entries must match the ordering for MemoryDetails::BrowserProcess. -static ProcessData g_process_template[MAX_BROWSERS]; - MemoryDetails::MemoryDetails() { static const std::wstring google_browser_name = l10n_util::GetString(IDS_PRODUCT_NAME); - ProcessData g_process_template[MAX_BROWSERS] = { + struct { + const wchar_t* name; + const wchar_t* process_name; + } process_template[MAX_BROWSERS] = { { google_browser_name.c_str(), L"chrome.exe", }, { google_browser_name.c_str(), L"nacl64.exe", }, { L"IE", L"iexplore.exe", }, @@ -50,10 +49,10 @@ MemoryDetails::MemoryDetails() { { L"Konqueror", L"konqueror.exe", }, }; - for (int index = 0; index < arraysize(g_process_template); ++index) { + for (int index = 0; index < MAX_BROWSERS; ++index) { ProcessData process; - process.name = g_process_template[index].name; - process.process_name = g_process_template[index].process_name; + process.name = process_template[index].name; + process.process_name = process_template[index].process_name; process_data_.push_back(process); } } @@ -67,7 +66,7 @@ void MemoryDetails::CollectProcessData( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); // Clear old data. - for (int index = 0; index < arraysize(g_process_template); index++) + for (unsigned int index = 0; index < process_data_.size(); index++) process_data_[index].processes.clear(); SYSTEM_INFO system_info; @@ -100,7 +99,7 @@ void MemoryDetails::CollectProcessData( IsWow64Process(handle, &is_wow64); is_64bit_process = !is_wow64; } - for (int index2 = 0; index2 < arraysize(g_process_template); index2++) { + for (unsigned int index2 = 0; index2 < process_data_.size(); index2++) { if (_wcsicmp(process_data_[index2].process_name.c_str(), process_entry.szExeFile) != 0) continue; diff --git a/chrome/browser/net/passive_log_collector.cc b/chrome/browser/net/passive_log_collector.cc index 09d2be8..2aca24f 100644 --- a/chrome/browser/net/passive_log_collector.cc +++ b/chrome/browser/net/passive_log_collector.cc @@ -37,6 +37,31 @@ bool SortByOrderComparator(const PassiveLogCollector::Entry& a, } // namespace +PassiveLogCollector::Entry::Entry(uint32 order, + net::NetLog::EventType type, + const base::TimeTicks& time, + net::NetLog::Source source, + net::NetLog::EventPhase phase, + net::NetLog::EventParameters* params) + : order(order), + type(type), + time(time), + source(source), + phase(phase), + params(params) { +} + +PassiveLogCollector::Entry::~Entry() {} + +PassiveLogCollector::SourceInfo::SourceInfo() + : source_id(net::NetLog::Source::kInvalidId), + num_entries_truncated(0), + reference_count(0), + is_alive(true) { +} + +PassiveLogCollector::SourceInfo::~SourceInfo() {} + //---------------------------------------------------------------------------- // PassiveLogCollector //---------------------------------------------------------------------------- diff --git a/chrome/browser/net/passive_log_collector.h b/chrome/browser/net/passive_log_collector.h index 8ffd459..d98049d 100644 --- a/chrome/browser/net/passive_log_collector.h +++ b/chrome/browser/net/passive_log_collector.h @@ -43,10 +43,8 @@ class PassiveLogCollector : public ChromeNetLog::Observer { const base::TimeTicks& time, net::NetLog::Source source, net::NetLog::EventPhase phase, - net::NetLog::EventParameters* params) - : order(order), type(type), time(time), source(source), phase(phase), - params(params) { - } + net::NetLog::EventParameters* params); + ~Entry(); uint32 order; net::NetLog::EventType type; @@ -60,9 +58,8 @@ class PassiveLogCollector : public ChromeNetLog::Observer { typedef std::vector<net::NetLog::Source> SourceDependencyList; struct SourceInfo { - SourceInfo() - : source_id(net::NetLog::Source::kInvalidId), - num_entries_truncated(0), reference_count(0), is_alive(true) {} + SourceInfo(); + ~SourceInfo(); // Returns the URL that corresponds with this source. This is // only meaningful for certain source types (URL_REQUEST, SOCKET_STREAM). diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 8faaebf..f47d395 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -46,12 +46,36 @@ void BalloonHost::Shutdown() { } } +Browser* BalloonHost::GetBrowser() const { + // Notifications aren't associated with a particular browser. + return NULL; +} + +gfx::NativeView BalloonHost::GetNativeViewOfHost() { + // TODO(aa): Should this return the native view of the BalloonView*? + return NULL; +} + +TabContents* BalloonHost::associated_tab_contents() const { return NULL; } + WebPreferences BalloonHost::GetWebkitPrefs() { WebPreferences prefs; prefs.allow_scripts_to_close_windows = true; return prefs; } +SiteInstance* BalloonHost::GetSiteInstance() const { + return site_instance_.get(); +} + +Profile* BalloonHost::GetProfile() const { + return balloon_->profile(); +} + +const GURL& BalloonHost::GetURL() const { + return balloon_->notification().content_url(); +} + void BalloonHost::Close(RenderViewHost* render_view_host) { balloon_->CloseByScript(); NotifyDisconnect(); @@ -76,6 +100,18 @@ void BalloonHost::RenderViewGone(RenderViewHost* render_view_host) { Close(render_view_host); } +int BalloonHost::GetBrowserWindowID() const { + return extension_misc::kUnknownWindowId; +} + +ViewType::Type BalloonHost::GetRenderViewType() const { + return ViewType::NOTIFICATION; +} + +RenderViewHostDelegate::View* BalloonHost::GetViewDelegate() { + return this; +} + void BalloonHost::ProcessDOMUIMessage( const ViewHostMsg_DomMessage_Params& params) { if (extension_function_dispatcher_.get()) { @@ -176,6 +212,8 @@ void BalloonHost::ClearInspectorSettings() { RenderViewHostDelegateHelper::ClearInspectorSettings(GetProfile()); } +BalloonHost::~BalloonHost() {} + void BalloonHost::NotifyDisconnect() { if (!should_notify_on_disconnect_) return; diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h index 4677241..1c8b088 100644 --- a/chrome/browser/notifications/balloon_host.h +++ b/chrome/browser/notifications/balloon_host.h @@ -34,15 +34,9 @@ class BalloonHost : public RenderViewHostDelegate, void Shutdown(); // ExtensionFunctionDispatcher::Delegate overrides. - virtual Browser* GetBrowser() const { - // Notifications aren't associated with a particular browser. - return NULL; - } - virtual gfx::NativeView GetNativeViewOfHost() { - // TODO(aa): Should this return the native view of the BalloonView*? - return NULL; - } - virtual TabContents* associated_tab_contents() const { return NULL; } + virtual Browser* GetBrowser() const; + virtual gfx::NativeView GetNativeViewOfHost(); + virtual TabContents* associated_tab_contents() const; RenderViewHost* render_view_host() const { return render_view_host_; } @@ -52,28 +46,18 @@ class BalloonHost : public RenderViewHostDelegate, // RenderViewHostDelegate overrides. virtual WebPreferences GetWebkitPrefs(); - virtual SiteInstance* GetSiteInstance() const { - return site_instance_.get(); - } - virtual Profile* GetProfile() const { return balloon_->profile(); } - virtual const GURL& GetURL() const { - return balloon_->notification().content_url(); - } + virtual SiteInstance* GetSiteInstance() const; + virtual Profile* GetProfile() const; + virtual const GURL& GetURL() const; virtual void Close(RenderViewHost* render_view_host); virtual void RenderViewCreated(RenderViewHost* render_view_host); virtual void RenderViewReady(RenderViewHost* render_view_host); virtual void RenderViewGone(RenderViewHost* render_view_host); virtual void UpdateTitle(RenderViewHost* render_view_host, int32 page_id, const std::wstring& title) {} - virtual int GetBrowserWindowID() const { - return extension_misc::kUnknownWindowId; - } - virtual ViewType::Type GetRenderViewType() const { - return ViewType::NOTIFICATION; - } - virtual RenderViewHostDelegate::View* GetViewDelegate() { - return this; - } + virtual int GetBrowserWindowID() const; + virtual ViewType::Type GetRenderViewType() const; + virtual RenderViewHostDelegate::View* GetViewDelegate(); virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); // RenderViewHostDelegate::View methods. Only the ones for opening new @@ -126,7 +110,7 @@ class BalloonHost : public RenderViewHostDelegate, virtual void ClearInspectorSettings(); protected: - virtual ~BalloonHost() {} + virtual ~BalloonHost(); // Must override in platform specific implementations. virtual void InitRenderWidgetHostView() = 0; virtual RenderWidgetHostView* render_widget_host_view() const = 0; diff --git a/chrome/browser/notifications/notification.cc b/chrome/browser/notifications/notification.cc new file mode 100644 index 0000000..c429efa --- /dev/null +++ b/chrome/browser/notifications/notification.cc @@ -0,0 +1,40 @@ +// 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 "chrome/browser/notifications/notification.h" + +Notification::Notification(const GURL& origin_url, + const GURL& content_url, + const string16& display_source, + const string16& replace_id, + NotificationDelegate* delegate) + : origin_url_(origin_url), + content_url_(content_url), + display_source_(display_source), + replace_id_(replace_id), + delegate_(delegate) { +} + +Notification::Notification(const Notification& notification) + : origin_url_(notification.origin_url()), + content_url_(notification.content_url()), + display_source_(notification.display_source()), + replace_id_(notification.replace_id()), + delegate_(notification.delegate()) { +} + +Notification::~Notification() {} + +Notification& Notification::operator=(const Notification& notification) { + origin_url_ = notification.origin_url(); + content_url_ = notification.content_url(); + display_source_ = notification.display_source(); + replace_id_ = notification.replace_id(); + delegate_ = notification.delegate(); + return *this; +} + +bool Notification::IsSame(const Notification& other) const { + return delegate()->id() == other.delegate()->id(); +} diff --git a/chrome/browser/notifications/notification.h b/chrome/browser/notifications/notification.h index f8ab903..7b0ab8c 100644 --- a/chrome/browser/notifications/notification.h +++ b/chrome/browser/notifications/notification.h @@ -17,32 +17,14 @@ class NotificationDelegate; // data: URLs representing simple text+icon notifications. class Notification { public: - Notification(const GURL& origin_url, const GURL& content_url, + Notification(const GURL& origin_url, + const GURL& content_url, const string16& display_source, const string16& replace_id, - NotificationDelegate* delegate) - : origin_url_(origin_url), - content_url_(content_url), - display_source_(display_source), - replace_id_(replace_id), - delegate_(delegate) { - } - - Notification(const Notification& notification) - : origin_url_(notification.origin_url()), - content_url_(notification.content_url()), - display_source_(notification.display_source()), - replace_id_(notification.replace_id()), - delegate_(notification.delegate()) { - } - - void operator=(const Notification& notification) { - origin_url_ = notification.origin_url(); - content_url_ = notification.content_url(); - display_source_ = notification.display_source(); - replace_id_ = notification.replace_id(); - delegate_ = notification.delegate(); - } + NotificationDelegate* delegate); + Notification(const Notification& notification); + ~Notification(); + Notification& operator=(const Notification& notification); // The URL (may be data:) containing the contents for the notification. const GURL& content_url() const { return content_url_; } @@ -60,9 +42,7 @@ class Notification { void Click() const { delegate()->Click(); } void Close(bool by_user) const { delegate()->Close(by_user); } - bool IsSame(const Notification& other) const { - return delegate()->id() == other.delegate()->id(); - } + bool IsSame(const Notification& other) const; private: NotificationDelegate* delegate() const { return delegate_.get(); } diff --git a/chrome/browser/notifications/notification_exceptions_table_model.cc b/chrome/browser/notifications/notification_exceptions_table_model.cc index 26270252..31a44d5 100644 --- a/chrome/browser/notifications/notification_exceptions_table_model.cc +++ b/chrome/browser/notifications/notification_exceptions_table_model.cc @@ -7,10 +7,20 @@ #include "app/l10n_util.h" #include "app/table_model_observer.h" #include "base/utf_string_conversions.h" +#include "chrome/common/content_settings.h" #include "chrome/common/content_settings_helper.h" +#include "chrome/common/content_settings_types.h" #include "chrome/common/url_constants.h" #include "grit/generated_resources.h" +struct NotificationExceptionsTableModel::Entry { + Entry(const GURL& origin, ContentSetting setting); + bool operator<(const Entry& b) const; + + GURL origin; + ContentSetting setting; +}; + NotificationExceptionsTableModel::NotificationExceptionsTableModel( DesktopNotificationService* service) : service_(service), @@ -25,6 +35,8 @@ NotificationExceptionsTableModel::NotificationExceptionsTableModel( sort(entries_.begin(), entries_.end()); } +NotificationExceptionsTableModel::~NotificationExceptionsTableModel() {} + bool NotificationExceptionsTableModel::CanRemoveRows( const Rows& rows) const { return !rows.empty(); diff --git a/chrome/browser/notifications/notification_exceptions_table_model.h b/chrome/browser/notifications/notification_exceptions_table_model.h index bef1fee..0fcf335 100644 --- a/chrome/browser/notifications/notification_exceptions_table_model.h +++ b/chrome/browser/notifications/notification_exceptions_table_model.h @@ -11,13 +11,12 @@ #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/remove_rows_table_model.h" -#include "chrome/common/content_settings.h" -#include "chrome/common/content_settings_types.h" class NotificationExceptionsTableModel : public RemoveRowsTableModel { public: explicit NotificationExceptionsTableModel( DesktopNotificationService* service); + virtual ~NotificationExceptionsTableModel(); // RemoveRowsTableModel overrides: virtual bool CanRemoveRows(const Rows& rows) const; @@ -30,13 +29,7 @@ class NotificationExceptionsTableModel : public RemoveRowsTableModel { virtual void SetObserver(TableModelObserver* observer); private: - struct Entry { - Entry(const GURL& origin, ContentSetting setting); - bool operator<(const Entry& b) const; - - GURL origin; - ContentSetting setting; - }; + struct Entry; DesktopNotificationService* service_; diff --git a/chrome/browser/notifications/notifications_prefs_cache.cc b/chrome/browser/notifications/notifications_prefs_cache.cc index a87b542..b1dbe2e 100644 --- a/chrome/browser/notifications/notifications_prefs_cache.cc +++ b/chrome/browser/notifications/notifications_prefs_cache.cc @@ -79,6 +79,8 @@ int NotificationsPrefsCache::HasPermission(const GURL& origin) { } } +NotificationsPrefsCache::~NotificationsPrefsCache() {} + bool NotificationsPrefsCache::IsOriginAllowed( const GURL& origin) { CheckThreadAccess(); diff --git a/chrome/browser/notifications/notifications_prefs_cache.h b/chrome/browser/notifications/notifications_prefs_cache.h index 758f0f7b..286813b 100644 --- a/chrome/browser/notifications/notifications_prefs_cache.h +++ b/chrome/browser/notifications/notifications_prefs_cache.h @@ -55,7 +55,7 @@ class NotificationsPrefsCache private: friend class base::RefCountedThreadSafe<NotificationsPrefsCache>; - ~NotificationsPrefsCache() {} + virtual ~NotificationsPrefsCache(); // Helper functions which read preferences. bool IsOriginAllowed(const GURL& origin); diff --git a/chrome/browser/parsers/metadata_parser_manager.cc b/chrome/browser/parsers/metadata_parser_manager.cc index a1bd93e..f428fa3 100644 --- a/chrome/browser/parsers/metadata_parser_manager.cc +++ b/chrome/browser/parsers/metadata_parser_manager.cc @@ -33,6 +33,8 @@ MetadataParserManager::MetadataParserManager() { RegisterParserFactory(factory); } +MetadataParserManager::~MetadataParserManager() {} + MetadataParser* MetadataParserManager::GetParserForFile(const FilePath& path) { char buffer[kAmountToRead]; diff --git a/chrome/browser/parsers/metadata_parser_manager.h b/chrome/browser/parsers/metadata_parser_manager.h index a16bdbe..67d7d51 100644 --- a/chrome/browser/parsers/metadata_parser_manager.h +++ b/chrome/browser/parsers/metadata_parser_manager.h @@ -19,6 +19,7 @@ class MetadataParserManager { public: // Creates a new MetadataParserManager. MetadataParserManager(); + ~MetadataParserManager(); // Gets the singleton static MetadataParserManager* Get(); diff --git a/chrome/browser/plugin_exceptions_table_model.cc b/chrome/browser/plugin_exceptions_table_model.cc index 6a655c2..21ed547 100644 --- a/chrome/browser/plugin_exceptions_table_model.cc +++ b/chrome/browser/plugin_exceptions_table_model.cc @@ -23,6 +23,8 @@ PluginExceptionsTableModel::PluginExceptionsTableModel( NotificationService::AllSources()); } +PluginExceptionsTableModel::~PluginExceptionsTableModel() {} + bool PluginExceptionsTableModel::CanRemoveRows(const Rows& rows) const { return !rows.empty(); } diff --git a/chrome/browser/plugin_exceptions_table_model.h b/chrome/browser/plugin_exceptions_table_model.h index 8a07745..f4f59e8 100644 --- a/chrome/browser/plugin_exceptions_table_model.h +++ b/chrome/browser/plugin_exceptions_table_model.h @@ -23,7 +23,7 @@ class PluginExceptionsTableModel : public RemoveRowsTableModel, public: PluginExceptionsTableModel(HostContentSettingsMap* content_settings_map, HostContentSettingsMap* otr_content_settings_map); - virtual ~PluginExceptionsTableModel() {} + virtual ~PluginExceptionsTableModel(); // Load plugin exceptions from the HostContentSettingsMaps. You should call // this method after creating a new PluginExceptionsTableModel. diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index b915474..988395d 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -473,3 +473,14 @@ void PluginProcessHost::OnPluginMessage( chrome_plugin->functions().on_message(data_ptr, data_len); } } + +PluginProcessHost::ChannelRequest::ChannelRequest( + ResourceMessageFilter* renderer_message_filter, + const std::string& m, + IPC::Message* r) + : mime_type(m), + reply_msg(r), + renderer_message_filter_(renderer_message_filter) { +} + +PluginProcessHost::ChannelRequest::~ChannelRequest() {} diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h index d7c278e..79e34a1 100644 --- a/chrome/browser/plugin_process_host.h +++ b/chrome/browser/plugin_process_host.h @@ -41,7 +41,7 @@ class PluginProcessHost : public BrowserChildProcessHost, public ResolveProxyMsgHelper::Delegate { public: PluginProcessHost(); - ~PluginProcessHost(); + virtual ~PluginProcessHost(); // Initialize the new plugin process, returning true on success. This must // be called before the object can be used. @@ -141,9 +141,9 @@ class PluginProcessHost : public BrowserChildProcessHost, struct ChannelRequest { ChannelRequest(ResourceMessageFilter* renderer_message_filter, - const std::string& m, IPC::Message* r) : - mime_type(m), reply_msg(r), - renderer_message_filter_(renderer_message_filter) { } + const std::string& m, IPC::Message* r); + ~ChannelRequest(); + std::string mime_type; IPC::Message* reply_msg; scoped_refptr<ResourceMessageFilter> renderer_message_filter_; diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 781d761..6f8619c 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -50,6 +50,13 @@ static Profile* GetDefaultProfile() { return profile_manager->GetDefaultProfile(user_data_dir); } +struct SafeBrowsingService::WhiteListedEntry { + int render_process_host_id; + int render_view_id; + std::string domain; + UrlCheckResult result; +}; + SafeBrowsingService::SafeBrowsingService() : database_(NULL), protocol_manager_(NULL), diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h index f2608d7..050437a 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.h +++ b/chrome/browser/safe_browsing/safe_browsing_service.h @@ -171,12 +171,7 @@ class SafeBrowsingService typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests; // Used for whitelisting a render view when the user ignores our warning. - struct WhiteListedEntry { - int render_process_host_id; - int render_view_id; - std::string domain; - UrlCheckResult result; - }; + struct WhiteListedEntry; // Clients that we've queued up for checking later once the database is ready. struct QueuedCheck { diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc index d81260f..0f99bf2 100644 --- a/chrome/browser/safe_browsing/safe_browsing_util.cc +++ b/chrome/browser/safe_browsing/safe_browsing_util.cc @@ -27,9 +27,24 @@ static const char kContinueUrlFormat[] = static const char kReportParams[] = "?tpl=%s&continue=%s&url=%s"; +// SBChunk --------------------------------------------------------------------- + +SBChunk::SBChunk() + : chunk_number(0), + list_id(0), + is_add(false) { +} + +SBChunk::~SBChunk() {} // SBChunkList ----------------------------------------------------------------- +SBChunkList::SBChunkList() {} + +SBChunkList::~SBChunkList() { + clear(); +} + void SBChunkList::clear() { for (std::vector<SBChunk>::iterator citer = chunks_.begin(); citer != chunks_.end(); ++citer) { @@ -44,6 +59,16 @@ void SBChunkList::clear() { chunks_.clear(); } +// SBListChunkRanges ----------------------------------------------------------- + +SBListChunkRanges::SBListChunkRanges(const std::string& n) : name(n) {} + +// SBChunkDelete --------------------------------------------------------------- + +SBChunkDelete::SBChunkDelete() : is_sub_del(false) {} + +SBChunkDelete::~SBChunkDelete() {} + // SBEntry --------------------------------------------------------------------- // static diff --git a/chrome/browser/safe_browsing/safe_browsing_util.h b/chrome/browser/safe_browsing/safe_browsing_util.h index b382608e..f147fe4 100644 --- a/chrome/browser/safe_browsing/safe_browsing_util.h +++ b/chrome/browser/safe_browsing/safe_browsing_util.h @@ -54,6 +54,9 @@ struct SBChunkHost { // Container for an add/sub chunk. struct SBChunk { + SBChunk(); + ~SBChunk(); + int chunk_number; int list_id; bool is_add; @@ -69,10 +72,8 @@ struct SBChunk { // dissappear. class SBChunkList { public: - SBChunkList() {} - ~SBChunkList() { - clear(); - } + SBChunkList(); + ~SBChunkList(); // Implement that subset of the |std::deque<>| interface which // callers expect. @@ -113,15 +114,18 @@ struct SBFullHashResult { // Contains information about a list in the database. struct SBListChunkRanges { + explicit SBListChunkRanges(const std::string& n); + std::string name; // The list name. std::string adds; // The ranges for add chunks. std::string subs; // The ranges for sub chunks. - - explicit SBListChunkRanges(const std::string& n) : name(n) { } }; // Container for deleting chunks from the database. struct SBChunkDelete { + SBChunkDelete(); + ~SBChunkDelete(); + std::string list_name; bool is_sub_del; std::vector<ChunkRange> chunk_del; diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index 22fbf3a..13782d8 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -13,6 +13,14 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" +ShellIntegration::ShortcutInfo::ShortcutInfo() + : create_on_desktop(false), + create_in_applications_menu(false), + create_in_quick_launch_bar(false) { +} + +ShellIntegration::ShortcutInfo::~ShortcutInfo() {} + std::string ShellIntegration::GetCommandLineArgumentsCommon(const GURL& url, const string16& extension_app_id) { const CommandLine cmd = *CommandLine::ForCurrentProcess(); diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index 33c82d8..b9c6530 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -49,6 +49,9 @@ class ShellIntegration { static bool IsFirefoxDefaultBrowser(); struct ShortcutInfo { + ShortcutInfo(); + ~ShortcutInfo(); + GURL url; // If |extension_id| is non-empty, this is short cut is to an extension-app // and the launch url will be detected at start-up. In this case, |url| diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 45ea2ca..38790c9 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -154,6 +154,10 @@ static void ServerNameToSyncAPIName(const std::string& server_name, } } +UserShare::UserShare() {} + +UserShare::~UserShare() {} + //////////////////////////////////// // BaseNode member definitions. diff --git a/chrome/browser/sync/engine/syncapi.h b/chrome/browser/sync/engine/syncapi.h index cbd8d8b..9a3da9b 100644 --- a/chrome/browser/sync/engine/syncapi.h +++ b/chrome/browser/sync/engine/syncapi.h @@ -107,6 +107,9 @@ class WriteTransaction; // This encompasses all pieces required to build transaction objects on the // syncable share. struct UserShare { + UserShare(); + ~UserShare(); + // The DirectoryManager itself, which is the parent of Transactions and can // be shared across multiple threads (unlike Directory). scoped_ptr<syncable::DirectoryManager> dir_manager; diff --git a/chrome/browser/sync/glue/extension_sync_traits.cc b/chrome/browser/sync/glue/extension_sync_traits.cc index 4940ece..74e291e 100644 --- a/chrome/browser/sync/glue/extension_sync_traits.cc +++ b/chrome/browser/sync/glue/extension_sync_traits.cc @@ -28,6 +28,8 @@ ExtensionSyncTraits::ExtensionSyncTraits( extension_specifics_setter(extension_specifics_setter), extension_specifics_entity_getter(extension_specifics_entity_getter) {} +ExtensionSyncTraits::~ExtensionSyncTraits() {} + namespace { const sync_pb::ExtensionSpecifics& GetExtensionSpecifics( diff --git a/chrome/browser/sync/glue/extension_sync_traits.h b/chrome/browser/sync/glue/extension_sync_traits.h index 6078874..86a5a89 100644 --- a/chrome/browser/sync/glue/extension_sync_traits.h +++ b/chrome/browser/sync/glue/extension_sync_traits.h @@ -47,6 +47,7 @@ struct ExtensionSyncTraits { ExtensionSpecificsGetter extension_specifics_getter, ExtensionSpecificsSetter extension_specifics_setter, ExtensionSpecificsEntityGetter extension_specifics_entity_getter); + ~ExtensionSyncTraits(); // The sync type for the data type. const syncable::ModelType model_type; diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc index 36285b7..0664bbf 100644 --- a/chrome/browser/webdata/web_data_service.cc +++ b/chrome/browser/webdata/web_data_service.cc @@ -34,12 +34,17 @@ using base::Time; using webkit_glue::FormField; using webkit_glue::PasswordForm; -WDAppImagesResult::WDAppImagesResult() : has_all_images(false) { -} +WDAppImagesResult::WDAppImagesResult() : has_all_images(false) {} + +WDAppImagesResult::~WDAppImagesResult() {} -WDAppImagesResult::~WDAppImagesResult() { +WDKeywordsResult::WDKeywordsResult() + : default_search_provider_id(0), + builtin_keyword_version(0) { } +WDKeywordsResult::~WDKeywordsResult() {} + WebDataService::WebDataService() : is_running_(false), db_(NULL), diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h index 02d9720..756a882 100644 --- a/chrome/browser/webdata/web_data_service.h +++ b/chrome/browser/webdata/web_data_service.h @@ -90,6 +90,9 @@ struct WDAppImagesResult { }; struct WDKeywordsResult { + WDKeywordsResult(); + ~WDKeywordsResult(); + std::vector<TemplateURL*> keywords; // Identifies the ID of the TemplateURL that is the default search. A value of // 0 indicates there is no default search provider. diff --git a/chrome/browser/window_sizer.cc b/chrome/browser/window_sizer.cc index dee1221..1b8ee47 100644 --- a/chrome/browser/window_sizer.cc +++ b/chrome/browser/window_sizer.cc @@ -107,6 +107,13 @@ class DefaultStateProvider : public WindowSizer::StateProvider { }; /////////////////////////////////////////////////////////////////////////////// +// MonitorInfoProvider, public: + +WindowSizer::MonitorInfoProvider::MonitorInfoProvider() {} + +WindowSizer::MonitorInfoProvider::~MonitorInfoProvider() {} + +/////////////////////////////////////////////////////////////////////////////// // WindowSizer, public: WindowSizer::WindowSizer( diff --git a/chrome/browser/window_sizer.h b/chrome/browser/window_sizer.h index 16958e2..d200d36 100644 --- a/chrome/browser/window_sizer.h +++ b/chrome/browser/window_sizer.h @@ -42,7 +42,8 @@ class WindowSizer { // the monitors on the system. class MonitorInfoProvider { public: - virtual ~MonitorInfoProvider() { } + MonitorInfoProvider(); + virtual ~MonitorInfoProvider(); // Returns the bounds of the work area of the primary monitor. virtual gfx::Rect GetPrimaryMonitorWorkArea() const = 0; diff --git a/chrome/browser/worker_host/worker_document_set.cc b/chrome/browser/worker_host/worker_document_set.cc index 2e4d9aa..3588bb1 100644 --- a/chrome/browser/worker_host/worker_document_set.cc +++ b/chrome/browser/worker_host/worker_document_set.cc @@ -62,3 +62,5 @@ WorkerDocumentSet::DocumentInfo::DocumentInfo( renderer_id_(renderer_id), render_view_route_id_(render_view_route_id) { } + +WorkerDocumentSet::~WorkerDocumentSet() {} diff --git a/chrome/browser/worker_host/worker_document_set.h b/chrome/browser/worker_host/worker_document_set.h index be3fff3..a73a9c9 100644 --- a/chrome/browser/worker_host/worker_document_set.h +++ b/chrome/browser/worker_host/worker_document_set.h @@ -80,6 +80,9 @@ class WorkerDocumentSet : public base::RefCounted<WorkerDocumentSet> { const DocumentInfoSet& documents() { return document_set_; } private: + friend class base::RefCounted<WorkerDocumentSet>; + virtual ~WorkerDocumentSet(); + DocumentInfoSet document_set_; }; diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 4ea7879..be0b3db 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1423,6 +1423,7 @@ 'browser/download/save_item.h', 'browser/download/save_package.cc', 'browser/download/save_package.h', + 'browser/download/save_types.cc', 'browser/download/save_types.h', 'browser/encoding_menu_controller.cc', 'browser/encoding_menu_controller.h', @@ -1979,6 +1980,7 @@ 'browser/history/history_database.cc', 'browser/history/history_database.h', 'browser/history/history_marshaling.h', + 'browser/history/history_notifications.cc', 'browser/history/history_notifications.h', 'browser/history/history_publisher.cc', 'browser/history/history_publisher.h', @@ -2265,6 +2267,7 @@ 'browser/notifications/balloon_collection_linux.cc', 'browser/notifications/desktop_notification_service.cc', 'browser/notifications/desktop_notification_service.h', + 'browser/notifications/notification.cc', 'browser/notifications/notification.h', 'browser/notifications/notification_delegate.h', 'browser/notifications/notification_exceptions_table_model.cc', |