Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: chrome/browser/status_icons/status_tray.h

Issue 10382229: status_icons: Change StatusTray to use ScopedVector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittest Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/status_icons/status_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/status_icons/status_tray.h
diff --git a/chrome/browser/status_icons/status_tray.h b/chrome/browser/status_icons/status_tray.h
index 047f814fa2e91d7a742e019788bdb6e362f23b49..6392b9956923576abd5251b68de29768c5232a5f 100644
--- a/chrome/browser/status_icons/status_tray.h
+++ b/chrome/browser/status_icons/status_tray.h
@@ -6,10 +6,9 @@
#define CHROME_BROWSER_STATUS_ICONS_STATUS_TRAY_H_
#pragma once
-#include <vector>
-
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_vector.h"
class StatusIcon;
@@ -32,7 +31,7 @@ class StatusTray {
void RemoveStatusIcon(StatusIcon* icon);
protected:
- typedef std::vector<StatusIcon*> StatusIconList;
+ typedef ScopedVector<StatusIcon> StatusIcons;
StatusTray();
@@ -40,13 +39,14 @@ class StatusTray {
virtual StatusIcon* CreatePlatformStatusIcon() = 0;
// Returns the list of active status icons so subclasses can operate on them.
- const StatusIconList& status_icons() { return status_icons_; }
+ const StatusIcons& status_icons() const { return status_icons_; }
private:
FRIEND_TEST_ALL_PREFIXES(StatusTrayTest, CreateRemove);
- // List containing all active StatusIcons.
- StatusIconList status_icons_;
+ // List containing all active StatusIcons. The icons are owned by this
+ // StatusTray.
+ StatusIcons status_icons_;
DISALLOW_COPY_AND_ASSIGN(StatusTray);
};
« no previous file with comments | « no previous file | chrome/browser/status_icons/status_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698