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

Side by Side Diff: chrome/browser/net/sdch_dictionary_fetcher.h

Issue 339763003: Revert of Clear SDCH information on "Clear browsing data" path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Support modularity by calling to load a new SDCH filter dictionary. 5 // Support modularity by calling to load a new SDCH filter dictionary.
6 // Note that this sort of calling can't be done in the /net directory, as it has 6 // Note that this sort of calling can't be done in the /net directory, as it has
7 // no concept of the HTTP cache (which is only visible at the browser level). 7 // no concept of the HTTP cache (which is only visible at the browser level).
8 8
9 #ifndef CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ 9 #ifndef CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_
10 #define CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ 10 #define CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_
(...skipping 19 matching lines...) Expand all
30 public base::NonThreadSafe { 30 public base::NonThreadSafe {
31 public: 31 public:
32 // Consumer must guarantee that the SdchManager pointer outlives 32 // Consumer must guarantee that the SdchManager pointer outlives
33 // this object. The current implementation guarantees this by 33 // this object. The current implementation guarantees this by
34 // the SdchManager owning this object. 34 // the SdchManager owning this object.
35 SdchDictionaryFetcher(net::SdchManager* manager, 35 SdchDictionaryFetcher(net::SdchManager* manager,
36 net::URLRequestContextGetter* context); 36 net::URLRequestContextGetter* context);
37 virtual ~SdchDictionaryFetcher(); 37 virtual ~SdchDictionaryFetcher();
38 38
39 // Implementation of SdchFetcher class. 39 // Implementation of SdchFetcher class.
40 // This method gets the requested dictionary, and then calls back into the
41 // SdchManager class with the dictionary's text.
40 virtual void Schedule(const GURL& dictionary_url) OVERRIDE; 42 virtual void Schedule(const GURL& dictionary_url) OVERRIDE;
41 virtual void Cancel() OVERRIDE;
42 43
43 private: 44 private:
44 // Delay in ms between Schedule and actual download. 45 // Delay in ms between Schedule and actual download.
45 // This leaves the URL in a queue, which is de-duped, so that there is less 46 // This leaves the URL in a queue, which is de-duped, so that there is less
46 // chance we'll try to load the same URL multiple times when a pile of 47 // chance we'll try to load the same URL multiple times when a pile of
47 // page subresources (or tabs opened in parallel) all suggest the dictionary. 48 // page subresources (or tabs opened in parallel) all suggest the dictionary.
48 static const int kMsDelayFromRequestTillDownload = 100; 49 static const int kMsDelayFromRequestTillDownload = 100;
49 50
50 // Ensure the download after the above delay. 51 // Ensure the download after the above delay.
51 void ScheduleDelayedRun(); 52 void ScheduleDelayedRun();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::set<GURL> attempted_load_; 89 std::set<GURL> attempted_load_;
89 90
90 // Store the system_url_request_context_getter to use it when we start 91 // Store the system_url_request_context_getter to use it when we start
91 // fetching. 92 // fetching.
92 scoped_refptr<net::URLRequestContextGetter> context_; 93 scoped_refptr<net::URLRequestContextGetter> context_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); 95 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher);
95 }; 96 };
96 97
97 #endif // CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ 98 #endif // CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/net/sdch_dictionary_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698