Fix weak_ptr's operator* implementation.

This looks like a typo. Seems that nobody has tried to use this operator before.

BUG=none
TEST=WeakPtrTest.Dereference

R=darin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9452021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123456 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h
index bdfc308..c0ba7f5 100644
--- a/base/memory/weak_ptr.h
+++ b/base/memory/weak_ptr.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
 
@@ -173,7 +173,7 @@
 
   T* operator*() const {
     DCHECK(get() != NULL);
-    return *get();
+    return get();
   }
   T* operator->() const {
     DCHECK(get() != NULL);
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
index 4b73d17..be28e52 100644
--- a/base/memory/weak_ptr_unittest.cc
+++ b/base/memory/weak_ptr_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
 
@@ -335,4 +335,12 @@
   thread.DeleteConsumer(consumer_copy);
 }
 
+TEST(WeakPtrTest, Dereference) {
+  Base data;
+  WeakPtrFactory<Base> factory(&data);
+  WeakPtr<Base> ptr = factory.GetWeakPtr();
+  EXPECT_EQ(&data, ptr.get());
+  EXPECT_EQ(&data, *ptr);
+}
+
 }  // namespace base