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

Side by Side Diff: chrome/browser/apps/drive/drive_app_converter.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/zero_suggest_provider.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 #include "chrome/browser/apps/drive/drive_app_converter.h" 5 #include "chrome/browser/apps/drive/drive_app_converter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 26 matching lines...) Expand all
37 public: 37 public:
38 IconFetcher(DriveAppConverter* converter, 38 IconFetcher(DriveAppConverter* converter,
39 const GURL& icon_url, 39 const GURL& icon_url,
40 int expected_size) 40 int expected_size)
41 : converter_(converter), 41 : converter_(converter),
42 icon_url_(icon_url), 42 icon_url_(icon_url),
43 expected_size_(expected_size) {} 43 expected_size_(expected_size) {}
44 ~IconFetcher() override {} 44 ~IconFetcher() override {}
45 45
46 void Start() { 46 void Start() {
47 fetcher_.reset( 47 fetcher_ = net::URLFetcher::Create(icon_url_, net::URLFetcher::GET, this);
48 net::URLFetcher::Create(icon_url_, net::URLFetcher::GET, this));
49 fetcher_->SetRequestContext(converter_->profile_->GetRequestContext()); 48 fetcher_->SetRequestContext(converter_->profile_->GetRequestContext());
50 fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES); 49 fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
51 fetcher_->Start(); 50 fetcher_->Start();
52 } 51 }
53 52
54 const GURL& icon_url() const { return icon_url_; } 53 const GURL& icon_url() const { return icon_url_; }
55 const SkBitmap& icon() const { return icon_; } 54 const SkBitmap& icon() const { return icon_; }
56 55
57 private: 56 private:
58 // net::URLFetcherDelegate overrides: 57 // net::URLFetcherDelegate overrides:
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return; 194 return;
196 } 195 }
197 196
198 extension_ = crx_installer_->extension(); 197 extension_ = crx_installer_->extension();
199 is_new_install_ = success && crx_installer_->current_version().empty(); 198 is_new_install_ = success && crx_installer_->current_version().empty();
200 PostInstallCleanUp(); 199 PostInstallCleanUp();
201 200
202 base::ResetAndReturn(&finished_callback_).Run(this, success); 201 base::ResetAndReturn(&finished_callback_).Run(this, success);
203 // |finished_callback_| could delete this. 202 // |finished_callback_| could delete this.
204 } 203 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/zero_suggest_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698