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

Side by Side Diff: net/url_request/sdch_dictionary_fetcher.h

Issue 423813002: Sdch view for net-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix component linkage Created 6 years, 1 month 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
« no previous file with comments | « net/net.gypi ('k') | net/url_request/sdch_dictionary_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // TODO(rdsmith): This class needs to delegate URLRequest::Delegate methods 5 // TODO(rdsmith): This class needs to delegate URLRequest::Delegate methods
6 // to the net/ embedder for correct implementation of authentication. 6 // to the net/ embedder for correct implementation of authentication.
7 // Specifically, this class needs the embedder to provide functionality 7 // Specifically, this class needs the embedder to provide functionality
8 // corresponding to 8 // corresponding to
9 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested}. 9 // URLRequest::Delegate::{OnAuthRequired,OnCertificateRequested}.
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 // This class is used by embedder SDCH policy object to fetch 30 // This class is used by embedder SDCH policy object to fetch
31 // dictionaries. It queues requests for dictionaries and dispatches 31 // dictionaries. It queues requests for dictionaries and dispatches
32 // them serially, implementing the URLRequest::Delegate interface to 32 // them serially, implementing the URLRequest::Delegate interface to
33 // handle callbacks (but see above TODO). It tracks all requests, only 33 // handle callbacks (but see above TODO). It tracks all requests, only
34 // attempting to fetch each dictionary once. 34 // attempting to fetch each dictionary once.
35 class NET_EXPORT SdchDictionaryFetcher : public URLRequest::Delegate, 35 class NET_EXPORT SdchDictionaryFetcher : public URLRequest::Delegate,
36 public base::NonThreadSafe { 36 public base::NonThreadSafe {
37 public: 37 public:
38 typedef base::Callback<void(const std::string& dictionary_text, 38 typedef base::Callback<void(const std::string& dictionary_text,
39 const GURL& dictionary_url)> 39 const GURL& dictionary_url,
40 const BoundNetLog& net_log)>
40 OnDictionaryFetchedCallback; 41 OnDictionaryFetchedCallback;
41 42
42 // The consumer must guarantee that |*context| outlives this object. 43 // The consumer must guarantee that |*context| outlives this object.
43 // |callback| will be called on successful dictionary fetch 44 // |callback| will be called on successful dictionary fetch
44 // requested through Schedule(). |callback| will not be called 45 // requested through Schedule(). |callback| will not be called
45 // after object destruction. 46 // after object destruction.
46 SdchDictionaryFetcher(URLRequestContext* context, 47 SdchDictionaryFetcher(URLRequestContext* context,
47 const OnDictionaryFetchedCallback& callback); 48 const OnDictionaryFetchedCallback& callback);
48 ~SdchDictionaryFetcher() override; 49 ~SdchDictionaryFetcher() override;
49 50
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const OnDictionaryFetchedCallback dictionary_fetched_callback_; 110 const OnDictionaryFetchedCallback dictionary_fetched_callback_;
110 111
111 base::WeakPtrFactory<SdchDictionaryFetcher> weak_factory_; 112 base::WeakPtrFactory<SdchDictionaryFetcher> weak_factory_;
112 113
113 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher); 114 DISALLOW_COPY_AND_ASSIGN(SdchDictionaryFetcher);
114 }; 115 };
115 116
116 } // namespace net 117 } // namespace net
117 118
118 #endif // NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_ 119 #endif // NET_URL_REQUEST_SDCH_DICTIONARY_FETCHER_H_
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/url_request/sdch_dictionary_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698