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

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

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Ensure the download after the above delay. 51 // Ensure the download after the above delay.
52 void ScheduleDelayedRun(); 52 void ScheduleDelayedRun();
53 53
54 // Make sure we're processing (or waiting for) the the arrival of the next URL 54 // Make sure we're processing (or waiting for) the the arrival of the next URL
55 // in the |fetch_queue_|. 55 // in the |fetch_queue_|.
56 void StartFetching(); 56 void StartFetching();
57 57
58 // Implementation of content::URLFetcherDelegate. Called after transmission 58 // Implementation of content::URLFetcherDelegate. Called after transmission
59 // completes (either successfully or with failure). 59 // completes (either successfully or with failure).
60 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; 60 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
61 61
62 // A queue of URLs that are being used to download dictionaries. 62 // A queue of URLs that are being used to download dictionaries.
63 std::queue<GURL> fetch_queue_; 63 std::queue<GURL> fetch_queue_;
64 // The currently outstanding URL fetch of a dicitonary. 64 // The currently outstanding URL fetch of a dicitonary.
65 // If this is null, then there is no outstanding request. 65 // If this is null, then there is no outstanding request.
66 scoped_ptr<content::URLFetcher> current_fetch_; 66 scoped_ptr<content::URLFetcher> current_fetch_;
67 67
68 // Always spread out the dictionary fetches, so that they don't steal 68 // Always spread out the dictionary fetches, so that they don't steal
69 // bandwidth from the actual page load. Create delayed tasks to spread out 69 // bandwidth from the actual page load. Create delayed tasks to spread out
70 // the download. 70 // the download.
(...skipping 16 matching lines...) Expand all
87 std::set<GURL> attempted_load_; 87 std::set<GURL> attempted_load_;
88 88
89 // Store the system_url_request_context_getter to use it when we start 89 // Store the system_url_request_context_getter to use it when we start
90 // fetching. 90 // fetching.
91 scoped_refptr<net::URLRequestContextGetter> context_; 91 scoped_refptr<net::URLRequestContextGetter> context_;
92 92
93 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); 93 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher);
94 }; 94 };
95 95
96 #endif // CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_ 96 #endif // CHROME_BROWSER_NET_SDCH_DICTIONARY_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/gaia/gaia_oauth_fetcher.cc ('k') | chrome/browser/net/sdch_dictionary_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698