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

Side by Side Diff: net/base/sdch_dictionary_fetcher.cc

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
« no previous file with comments | « net/base/sdch_dictionary_fetcher.h ('k') | net/http/disk_cache_based_quic_server_info.h » ('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 #include "net/base/sdch_dictionary_fetcher.h" 5 #include "net/base/sdch_dictionary_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "net/base/load_flags.h" 10 #include "net/base/load_flags.h"
11 #include "net/url_request/url_fetcher.h" 11 #include "net/url_request/url_fetcher.h"
12 #include "net/url_request/url_request_context_getter.h" 12 #include "net/url_request/url_request_context_getter.h"
13 #include "net/url_request/url_request_status.h" 13 #include "net/url_request/url_request_status.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 SdchDictionaryFetcher::SdchDictionaryFetcher( 17 SdchDictionaryFetcher::SdchDictionaryFetcher(
18 SdchManager* manager, 18 SdchManager* manager,
19 scoped_refptr<URLRequestContextGetter> context) 19 scoped_refptr<URLRequestContextGetter> context)
20 : manager_(manager), 20 : manager_(manager),
21 weak_factory_(this),
22 task_is_pending_(false), 21 task_is_pending_(false),
23 context_(context) { 22 context_(context),
23 weak_factory_(this) {
24 DCHECK(CalledOnValidThread()); 24 DCHECK(CalledOnValidThread());
25 DCHECK(manager); 25 DCHECK(manager);
26 } 26 }
27 27
28 SdchDictionaryFetcher::~SdchDictionaryFetcher() { 28 SdchDictionaryFetcher::~SdchDictionaryFetcher() {
29 DCHECK(CalledOnValidThread()); 29 DCHECK(CalledOnValidThread());
30 } 30 }
31 31
32 void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) { 32 void SdchDictionaryFetcher::Schedule(const GURL& dictionary_url) {
33 DCHECK(CalledOnValidThread()); 33 DCHECK(CalledOnValidThread());
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 (source->GetStatus().status() == URLRequestStatus::SUCCESS)) { 96 (source->GetStatus().status() == URLRequestStatus::SUCCESS)) {
97 std::string data; 97 std::string data;
98 source->GetResponseAsString(&data); 98 source->GetResponseAsString(&data);
99 manager_->AddSdchDictionary(data, source->GetURL()); 99 manager_->AddSdchDictionary(data, source->GetURL());
100 } 100 }
101 current_fetch_.reset(NULL); 101 current_fetch_.reset(NULL);
102 ScheduleDelayedRun(); 102 ScheduleDelayedRun();
103 } 103 }
104 104
105 } // namespace net 105 } // namespace net
OLDNEW
« no previous file with comments | « net/base/sdch_dictionary_fetcher.h ('k') | net/http/disk_cache_based_quic_server_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698