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

Side by Side Diff: chrome/browser/search/suggestions/image_fetcher_impl.cc

Issue 1731483003: chrome: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 "chrome/browser/search/suggestions/image_fetcher_impl.h" 5 #include "chrome/browser/search/suggestions/image_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "net/base/load_flags.h" 10 #include "net/base/load_flags.h"
11 #include "net/url_request/url_request_context_getter.h" 11 #include "net/url_request/url_request_context_getter.h"
12 12
13 namespace suggestions { 13 namespace suggestions {
14 14
15 ImageFetcherImpl::ImageFetcherImpl( 15 ImageFetcherImpl::ImageFetcherImpl(
16 net::URLRequestContextGetter* url_request_context) 16 net::URLRequestContextGetter* url_request_context)
17 : delegate_(NULL), url_request_context_(url_request_context) {} 17 : delegate_(NULL), url_request_context_(url_request_context) {}
18 18
19 ImageFetcherImpl::~ImageFetcherImpl() {} 19 ImageFetcherImpl::~ImageFetcherImpl() {}
20 20
21 ImageFetcherImpl::ImageRequest::ImageRequest() : fetcher(NULL) {} 21 ImageFetcherImpl::ImageRequest::ImageRequest() : fetcher(NULL) {}
22 22
23 ImageFetcherImpl::ImageRequest::ImageRequest(chrome::BitmapFetcher* f) 23 ImageFetcherImpl::ImageRequest::ImageRequest(chrome::BitmapFetcher* f)
24 : fetcher(f) {} 24 : fetcher(f) {}
25 25
26 ImageFetcherImpl::ImageRequest::ImageRequest(const ImageRequest& other) =
27 default;
28
26 ImageFetcherImpl::ImageRequest::~ImageRequest() { delete fetcher; } 29 ImageFetcherImpl::ImageRequest::~ImageRequest() { delete fetcher; }
27 30
28 void ImageFetcherImpl::SetImageFetcherDelegate(ImageFetcherDelegate* delegate) { 31 void ImageFetcherImpl::SetImageFetcherDelegate(ImageFetcherDelegate* delegate) {
29 DCHECK(delegate); 32 DCHECK(delegate);
30 delegate_ = delegate; 33 delegate_ = delegate;
31 } 34 }
32 35
33 void ImageFetcherImpl::StartOrQueueNetworkRequest( 36 void ImageFetcherImpl::StartOrQueueNetworkRequest(
34 const GURL& url, const GURL& image_url, 37 const GURL& url, const GURL& image_url,
35 base::Callback<void(const GURL&, const SkBitmap*)> callback) { 38 base::Callback<void(const GURL&, const SkBitmap*)> callback) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Inform the ImageFetcherDelegate. 75 // Inform the ImageFetcherDelegate.
73 if (delegate_) { 76 if (delegate_) {
74 delegate_->OnImageFetched(request->url, bitmap); 77 delegate_->OnImageFetched(request->url, bitmap);
75 } 78 }
76 79
77 // Erase the completed ImageRequest. 80 // Erase the completed ImageRequest.
78 pending_net_requests_.erase(image_iter); 81 pending_net_requests_.erase(image_iter);
79 } 82 }
80 83
81 } // namespace suggestions 84 } // namespace suggestions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698