Update base::scoped_refptr<> docs
chromium-style enforces a private or protected destructor for classes
that derive from RefCounted<> which in turn makes it necessary to add a
friend declaration for RefCounted<>.
BUG=none
Review-Url: https://codereview.chromium.org/2533243002
Cr-Commit-Position: refs/heads/master@{#435516}
CrOS-Libchrome-Original-Commit: 55b05a8ae594e2e8d49c7e6da64bbea51df7a76f
diff --git a/base/memory/ref_counted.h b/base/memory/ref_counted.h
index 960c8a2..784a178 100644
--- a/base/memory/ref_counted.h
+++ b/base/memory/ref_counted.h
@@ -224,6 +224,9 @@
//
// class MyFoo : public RefCounted<MyFoo> {
// ...
+// private:
+// friend class RefCounted<MyFoo>; // Allow destruction by RefCounted<>.
+// ~MyFoo(); // Destructor must be private/protected.
// };
//
// void some_function() {