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

Unified Diff: chrome/browser/spellchecker/spellcheck_host_impl.h

Issue 7919003: Remove refptr usages from SpellCheckHost (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix pointer returns. Update tests. Created 9 years, 2 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: chrome/browser/spellchecker/spellcheck_host_impl.h
diff --git a/chrome/browser/spellchecker/spellcheck_host_impl.h b/chrome/browser/spellchecker/spellcheck_host_impl.h
index 30c217cb61023afbbd1f7844c4e2b03a83be3988..0187ae775b0a561505d1be02fe039fd75b721d37 100644
--- a/chrome/browser/spellchecker/spellcheck_host_impl.h
+++ b/chrome/browser/spellchecker/spellcheck_host_impl.h
@@ -11,6 +11,7 @@
#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/spellchecker/spellcheck_host.h"
#include "chrome/browser/spellchecker/spellcheck_profile_provider.h"
#include "content/common/net/url_fetcher.h"
@@ -46,6 +47,8 @@ class SpellCheckHostImpl : public SpellCheckHost,
net::URLRequestContextGetter* request_context_getter,
SpellCheckHostMetrics* metrics);
+ virtual ~SpellCheckHostImpl();
+
void Initialize();
// SpellCheckHost implementation
@@ -63,8 +66,6 @@ class SpellCheckHostImpl : public SpellCheckHost,
friend class BrowserThread;
friend class DeleteTask<SpellCheckHostImpl>;
- virtual ~SpellCheckHostImpl();
-
// Figure out the location for the dictionary. This is only non-trivial for
// Windows:
// The default place whether the spellcheck dictionary can reside is
@@ -161,6 +162,8 @@ class SpellCheckHostImpl : public SpellCheckHost,
// An optional metrics counter given by the constructor.
SpellCheckHostMetrics* metrics_;
+ base::WeakPtrFactory<SpellCheckHostImpl> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SpellCheckHostImpl);
};

Powered by Google App Engine
This is Rietveld 408576698