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

Side by Side Diff: chrome/browser/extensions/api/management/chrome_management_api_delegate.cc

Issue 899443002: Create bookmark apps at the end of the process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hopefully last test Created 5 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/extensions/api/management/chrome_management_api_delegat e.h" 5 #include "chrome/browser/extensions/api/management/chrome_management_api_delegat e.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/bookmark_app_helper.h" 8 #include "chrome/browser/extensions/bookmark_app_helper.h"
9 #include "chrome/browser/extensions/chrome_extension_function_details.h" 9 #include "chrome/browser/extensions/chrome_extension_function_details.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 if (!image_result.image.IsEmpty()) { 126 if (!image_result.image.IsEmpty()) {
127 WebApplicationInfo::IconInfo icon; 127 WebApplicationInfo::IconInfo icon;
128 icon.data = image_result.image.AsBitmap(); 128 icon.data = image_result.image.AsBitmap();
129 icon.width = icon.data.width(); 129 icon.width = icon.data.width();
130 icon.height = icon.data.height(); 130 icon.height = icon.data.height();
131 web_app.icons.push_back(icon); 131 web_app.icons.push_back(icon);
132 } 132 }
133 133
134 bookmark_app_helper_.reset(new extensions::BookmarkAppHelper( 134 bookmark_app_helper_.reset(new extensions::BookmarkAppHelper(
135 extensions::ExtensionSystem::Get(context)->extension_service(), web_app, 135 Profile::FromBrowserContext(context), web_app, NULL));
136 NULL));
137 bookmark_app_helper_->Create( 136 bookmark_app_helper_->Create(
138 base::Bind(&extensions::ManagementGenerateAppForLinkFunction:: 137 base::Bind(&extensions::ManagementGenerateAppForLinkFunction::
139 FinishCreateBookmarkApp, 138 FinishCreateBookmarkApp,
140 function)); 139 function));
141 } 140 }
142 141
143 scoped_ptr<extensions::BookmarkAppHelper> bookmark_app_helper_; 142 scoped_ptr<extensions::BookmarkAppHelper> bookmark_app_helper_;
144 143
145 // Used for favicon loading tasks. 144 // Used for favicon loading tasks.
146 base::CancelableTaskTracker cancelable_task_tracker_; 145 base::CancelableTaskTracker cancelable_task_tracker_;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 305
307 GURL ChromeManagementAPIDelegate::GetIconURL( 306 GURL ChromeManagementAPIDelegate::GetIconURL(
308 const extensions::Extension* extension, 307 const extensions::Extension* extension,
309 int icon_size, 308 int icon_size,
310 ExtensionIconSet::MatchType match, 309 ExtensionIconSet::MatchType match,
311 bool grayscale, 310 bool grayscale,
312 bool* exists) const { 311 bool* exists) const {
313 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, 312 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size,
314 match, grayscale, exists); 313 match, grayscale, exists);
315 } 314 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/bookmark_app_helper.h » ('j') | chrome/browser/extensions/bookmark_app_helper.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698