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

Unified Diff: chrome/browser/net/sdch_dictionary_fetcher.h

Issue 298063006: Make SdchManager per-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make access to sdch manager in tests go through an accessor." Created 6 years, 6 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/net/sdch_dictionary_fetcher.h
diff --git a/chrome/browser/net/sdch_dictionary_fetcher.h b/chrome/browser/net/sdch_dictionary_fetcher.h
index 96617438fb90477afbfca891aebd4e64e1d7f51b..e69ec69eab09a5abd22e28a1247836a5cb3f497f 100644
--- a/chrome/browser/net/sdch_dictionary_fetcher.h
+++ b/chrome/browser/net/sdch_dictionary_fetcher.h
@@ -29,13 +29,13 @@ class SdchDictionaryFetcher
public net::SdchFetcher,
public base::NonThreadSafe {
public:
- explicit SdchDictionaryFetcher(net::URLRequestContextGetter* context);
+ // Consumer must guarantee that the SdchManager pointer outlives
+ // this object. Usually this is done by making sure the manager
jar (doing other things) 2014/06/09 23:03:01 nit: Rather then then passive voice of "Usually th
Randy Smith (Not in Mondays) 2014/06/10 20:38:41 Done.
+ // owns this object.
+ SdchDictionaryFetcher(net::SdchManager* manager,
+ net::URLRequestContextGetter* context);
virtual ~SdchDictionaryFetcher();
- // Stop fetching dictionaries, and abandon any current URLFetcheer operations
- // so that the IO thread can be stopped.
- static void Shutdown();
-
// Implementation of SdchFetcher class.
// This method gets the requested dictionary, and then calls back into the
// SdchManager class with the dictionary's text.
@@ -59,6 +59,8 @@ class SdchDictionaryFetcher
// completes (either successfully or with failure).
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
+ net::SdchManager* manager_;
jar (doing other things) 2014/06/09 23:03:01 nit: can/should this be const?
Randy Smith (Not in Mondays) 2014/06/10 20:38:41 I'm inclined to say "no"; the method that's used o
jar (doing other things) 2014/06/11 20:04:43 To be sure I was clear, I was asking for: const ne
Randy Smith (Not in Mondays) 2014/06/11 20:43:37 Sorry, that was just a braino on my part. You're
+
// A queue of URLs that are being used to download dictionaries.
std::queue<GURL> fetch_queue_;
// The currently outstanding URL fetch of a dicitonary.

Powered by Google App Engine
This is Rietveld 408576698