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

Side by Side Diff: chrome/browser/extensions/api/dashboard_private/dashboard_private_api.cc

Issue 1822303002: [Extensions] Convert APIs to use movable types [4] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Istiaque's Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/api/dashboard_private/dashboard_private_api. h" 5 #include "chrome/browser/extensions/api/dashboard_private/dashboard_private_api. h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // The response is sent in OnFetchComplete or OnInstallApproval. 235 // The response is sent in OnFetchComplete or OnInstallApproval.
236 return RespondLater(); 236 return RespondLater();
237 } 237 }
238 238
239 void DashboardPrivateShowPermissionPromptForDelegatedBundleInstallFunction:: 239 void DashboardPrivateShowPermissionPromptForDelegatedBundleInstallFunction::
240 OnFetchComplete(const GURL& url, const SkBitmap* bitmap) { 240 OnFetchComplete(const GURL& url, const SkBitmap* bitmap) {
241 BundleInstaller::ItemList items; 241 BundleInstaller::ItemList items;
242 for (const auto& entry : params_->contents) { 242 for (const auto& entry : params_->contents) {
243 BundleInstaller::Item item; 243 BundleInstaller::Item item;
244 item.id = entry->id; 244 item.id = entry.id;
245 item.manifest = entry->manifest; 245 item.manifest = entry.manifest;
246 item.localized_name = entry->localized_name; 246 item.localized_name = entry.localized_name;
247 if (entry->icon_url) 247 if (entry.icon_url)
248 item.icon_url = source_url().Resolve(*entry->icon_url); 248 item.icon_url = source_url().Resolve(*entry.icon_url);
249 items.push_back(item); 249 items.push_back(item);
250 } 250 }
251 if (items.empty()) { 251 if (items.empty()) {
252 Respond(Error(kAlreadyInstalledError)); 252 Respond(Error(kAlreadyInstalledError));
253 Release(); // Matches the AddRef in Run. 253 Release(); // Matches the AddRef in Run.
254 return; 254 return;
255 } 255 }
256 256
257 bundle_.reset(new BundleInstaller(chrome_details_.GetCurrentBrowser(), 257 bundle_.reset(new BundleInstaller(chrome_details_.GetCurrentBrowser(),
258 params_->details.localized_name, 258 params_->details.localized_name,
(...skipping 16 matching lines...) Expand all
275 ? kUserCancelledError 275 ? kUserCancelledError
276 : kInvalidBundleError)); 276 : kInvalidBundleError));
277 return; 277 return;
278 } 278 }
279 279
280 Respond(NoArguments()); 280 Respond(NoArguments());
281 } 281 }
282 282
283 } // namespace extensions 283 } // namespace extensions
284 284
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/feedback_util.cc ('k') | chrome/browser/extensions/api/dial/dial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698