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

Unified Diff: content/browser/device_orientation/provider_unittest.cc

Issue 10068037: RefCounted types should not have public destructors, content/browser part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC fixes Created 8 years, 8 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
Index: content/browser/device_orientation/provider_unittest.cc
diff --git a/content/browser/device_orientation/provider_unittest.cc b/content/browser/device_orientation/provider_unittest.cc
index b373b89d50228cca4dfa6ea1d11fd461df6b4453..e95e7b8cbc9df78714e2bedfc5e8d0482a4b3988 100644
--- a/content/browser/device_orientation/provider_unittest.cc
+++ b/content/browser/device_orientation/provider_unittest.cc
@@ -73,10 +73,6 @@ class MockOrientationFactory : public base::RefCounted<MockOrientationFactory> {
instance_ = this;
}
- ~MockOrientationFactory() {
- instance_ = NULL;
- }
-
static DataFetcher* CreateDataFetcher() {
EXPECT_TRUE(instance_);
return new MockDataFetcher(instance_);
@@ -88,6 +84,12 @@ class MockOrientationFactory : public base::RefCounted<MockOrientationFactory> {
}
private:
+ friend class base::RefCounted<MockOrientationFactory>;
+
+ ~MockOrientationFactory() {
+ instance_ = NULL;
+ }
+
// Owned by ProviderImpl. Holds a reference back to MockOrientationFactory.
class MockDataFetcher : public DataFetcher {
public:

Powered by Google App Engine
This is Rietveld 408576698