diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 13:54:38 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 13:54:38 +0000 |
commit | 8da4b181bb0e611e1f6ce2880b5ebcfec7efa99f (patch) | |
tree | 2981a415045b6475c27fff558d1213459c7fbe7a | |
parent | 06b8914b3a620f1d7d16c52422fec03116fd9c7b (diff) | |
download | chromium_src-8da4b181bb0e611e1f6ce2880b5ebcfec7efa99f.zip chromium_src-8da4b181bb0e611e1f6ce2880b5ebcfec7efa99f.tar.gz chromium_src-8da4b181bb0e611e1f6ce2880b5ebcfec7efa99f.tar.bz2 |
Do not inherit from std::vector.
vector does not have a virtual destructor, see Item 7 from of Effective STL from
Scott Meyers for a detailed explanation.
BUG=135335
R=markusheintz@chromium.org,willchan@chromium.org
TBR=jam@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10796081
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148315 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/content_settings/tab_specific_content_settings.h | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/api/cookies/cookies_api.h | 2 | ||||
-rw-r--r-- | chrome/browser/ui/website_settings/website_settings_ui.h | 15 | ||||
-rw-r--r-- | content/browser/renderer_host/render_message_filter.h | 2 | ||||
-rw-r--r-- | content/browser/renderer_host/resource_dispatcher_host_impl.h | 2 | ||||
-rw-r--r-- | content/public/browser/content_browser_client.h | 2 | ||||
-rw-r--r-- | net/base/network_delegate.h | 2 | ||||
-rw-r--r-- | net/cookies/canonical_cookie.h | 4 | ||||
-rw-r--r-- | net/cookies/cookie_monster.h | 3 | ||||
-rw-r--r-- | net/url_request/url_request.h | 2 | ||||
-rw-r--r-- | net/url_request/url_request_job.h | 2 |
11 files changed, 16 insertions, 22 deletions
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h index 4e19d81..ba02811 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.h +++ b/chrome/browser/content_settings/tab_specific_content_settings.h @@ -20,6 +20,7 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" +#include "net/cookies/canonical_cookie.h" class CookiesTreeModel; class Profile; @@ -29,7 +30,6 @@ class RenderViewHost; } namespace net { -class CookieList; class CookieOptions; } diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h index 5be7ebc..32c0949 100644 --- a/chrome/browser/extensions/api/cookies/cookies_api.h +++ b/chrome/browser/extensions/api/cookies/cookies_api.h @@ -20,13 +20,13 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" +#include "net/cookies/canonical_cookie.h" namespace base { class DictionaryValue; } namespace net { -class CookieList; class URLRequestContextGetter; } diff --git a/chrome/browser/ui/website_settings/website_settings_ui.h b/chrome/browser/ui/website_settings/website_settings_ui.h index e931da9..e9a32bb 100644 --- a/chrome/browser/ui/website_settings/website_settings_ui.h +++ b/chrome/browser/ui/website_settings/website_settings_ui.h @@ -14,12 +14,10 @@ #include "chrome/common/content_settings_types.h" #include "ui/gfx/native_widget_types.h" -class CookieInfoList; + class GURL; -class PermissionInfoList; class Profile; class WebsiteSettings; - namespace content { struct SSLStatus; } @@ -85,6 +83,9 @@ class WebsiteSettingsUI { std::string connection_status_description; }; + typedef std::vector<CookieInfo> CookieInfoList; + typedef std::vector<PermissionInfo> PermissionInfoList; + virtual ~WebsiteSettingsUI(); // Returns the UI string for the given permission |type|. @@ -130,11 +131,7 @@ class WebsiteSettingsUI { virtual void SetFirstVisit(const string16& first_visit) = 0; }; -class CookieInfoList : public std::vector<WebsiteSettingsUI::CookieInfo> { -}; - -class PermissionInfoList - : public std::vector<WebsiteSettingsUI::PermissionInfo> { -}; +typedef WebsiteSettingsUI::CookieInfoList CookieInfoList; +typedef WebsiteSettingsUI::PermissionInfoList PermissionInfoList; #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_UI_H_ diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index 51eed1bf..10d2b92 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -21,6 +21,7 @@ #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" #include "content/public/browser/browser_message_filter.h" #include "media/base/channel_layout.h" +#include "net/cookies/canonical_cookie.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" #include "ui/gfx/native_widget_types.h" #include "ui/surface/transport_dib.h" @@ -52,7 +53,6 @@ struct MediaLogEvent; } namespace net { -class CookieList; class URLRequestContextGetter; } diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.h b/content/browser/renderer_host/resource_dispatcher_host_impl.h index 0b75399..83fe21d 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_impl.h +++ b/content/browser/renderer_host/resource_dispatcher_host_impl.h @@ -32,6 +32,7 @@ #include "content/public/browser/notification_types.h" #include "content/public/browser/resource_dispatcher_host.h" #include "ipc/ipc_message.h" +#include "net/cookies/canonical_cookie.h" #include "net/url_request/url_request.h" #include "webkit/glue/resource_type.h" @@ -43,7 +44,6 @@ struct ResourceHostMsg_Request; struct ViewMsg_SwapOut_Params; namespace net { -class CookieList; class URLRequestJobFactory; } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index 9fb5a4d..01b26e1 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -12,6 +12,7 @@ #include "base/callback_forward.h" #include "content/public/common/content_client.h" #include "content/public/common/window_container_type.h" +#include "net/cookies/canonical_cookie.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h" #if defined(OS_POSIX) && !defined(OS_MACOSX) @@ -37,7 +38,6 @@ class ImageSkia; } namespace net { -class CookieList; class CookieOptions; class HttpNetworkSession; class NetLog; diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h index 137c914..5ecd0f8 100644 --- a/net/base/network_delegate.h +++ b/net/base/network_delegate.h @@ -12,6 +12,7 @@ #include "base/threading/non_thread_safe.h" #include "net/base/auth.h" #include "net/base/completion_callback.h" +#include "net/cookies/canonical_cookie.h" class FilePath; class GURL; @@ -28,7 +29,6 @@ namespace net { // NOTE: It is not okay to add any compile-time dependencies on symbols outside // of net/base here, because we have a net_base library. Forward declarations // are ok. -class CookieList; class CookieOptions; class HttpRequestHeaders; class HttpResponseHeaders; diff --git a/net/cookies/canonical_cookie.h b/net/cookies/canonical_cookie.h index 4a710b2..ff07ec6 100644 --- a/net/cookies/canonical_cookie.h +++ b/net/cookies/canonical_cookie.h @@ -20,7 +20,6 @@ class ParsedCookie; class NET_EXPORT CanonicalCookie { public: - // These constructors do no validation or canonicalization of their inputs; // the resulting CanonicalCookies should not be relied on to be canonical // unless the caller has done appropriate validation and canonicalization @@ -148,8 +147,7 @@ class NET_EXPORT CanonicalCookie { bool httponly_; }; -class CookieList : public std::vector<CanonicalCookie> { -}; +typedef std::vector<CanonicalCookie> CookieList; } // namespace net diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h index ef5f9ab..4950e7a 100644 --- a/net/cookies/cookie_monster.h +++ b/net/cookies/cookie_monster.h @@ -22,6 +22,7 @@ #include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "base/time.h" +#include "net/cookies/canonical_cookie.h" #include "net/cookies/cookie_store.h" #include "net/base/net_export.h" @@ -34,8 +35,6 @@ class TimeTicks; namespace net { -class CanonicalCookie; -class CookieList; class ParsedCookie; // The cookie monster is the system for storing and retrieving cookies. It has diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index f405de2..a401c58 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -23,6 +23,7 @@ #include "net/base/net_log.h" #include "net/base/network_delegate.h" #include "net/base/request_priority.h" +#include "net/cookies/canonical_cookie.h" #include "net/http/http_request_headers.h" #include "net/http/http_response_info.h" #include "net/url_request/url_request_status.h" @@ -84,7 +85,6 @@ class BlobURLRequestJobTest; namespace net { -class CookieList; class CookieOptions; class HostPortPair; class IOBuffer; diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h index e392c76..92ceb14 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h @@ -17,12 +17,12 @@ #include "net/base/host_port_pair.h" #include "net/base/load_states.h" #include "net/base/net_export.h" +#include "net/cookies/canonical_cookie.h" namespace net { class AuthChallengeInfo; class AuthCredentials; -class CookieList; class CookieOptions; class HttpRequestHeaders; class HttpResponseInfo; |