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

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

Issue 2261313002: [Extensions] Convert some SyncExtensionFunctions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready Created 4 years, 4 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/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 }; 164 };
165 165
166 } // namespace 166 } // namespace
167 167
168 ChromeManagementAPIDelegate::ChromeManagementAPIDelegate() { 168 ChromeManagementAPIDelegate::ChromeManagementAPIDelegate() {
169 } 169 }
170 170
171 ChromeManagementAPIDelegate::~ChromeManagementAPIDelegate() { 171 ChromeManagementAPIDelegate::~ChromeManagementAPIDelegate() {
172 } 172 }
173 173
174 bool ChromeManagementAPIDelegate::LaunchAppFunctionDelegate( 174 void ChromeManagementAPIDelegate::LaunchAppFunctionDelegate(
175 const extensions::Extension* extension, 175 const extensions::Extension* extension,
176 content::BrowserContext* context) const { 176 content::BrowserContext* context) const {
177 // Look at prefs to find the right launch container. 177 // Look at prefs to find the right launch container.
178 // If the user has not set a preference, the default launch value will be 178 // If the user has not set a preference, the default launch value will be
179 // returned. 179 // returned.
180 extensions::LaunchContainer launch_container = 180 extensions::LaunchContainer launch_container =
181 GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension); 181 GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension);
182 OpenApplication(AppLaunchParams( 182 OpenApplication(AppLaunchParams(
183 Profile::FromBrowserContext(context), extension, launch_container, 183 Profile::FromBrowserContext(context), extension, launch_container,
184 NEW_FOREGROUND_TAB, extensions::SOURCE_MANAGEMENT_API)); 184 NEW_FOREGROUND_TAB, extensions::SOURCE_MANAGEMENT_API));
185 extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_EXTENSION_API, 185 extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_EXTENSION_API,
186 extension->GetType()); 186 extension->GetType());
187
188 return true;
189 } 187 }
190 188
191 GURL ChromeManagementAPIDelegate::GetFullLaunchURL( 189 GURL ChromeManagementAPIDelegate::GetFullLaunchURL(
192 const extensions::Extension* extension) const { 190 const extensions::Extension* extension) const {
193 return extensions::AppLaunchInfo::GetFullLaunchURL(extension); 191 return extensions::AppLaunchInfo::GetFullLaunchURL(extension);
194 } 192 }
195 193
196 extensions::LaunchType ChromeManagementAPIDelegate::GetLaunchType( 194 extensions::LaunchType ChromeManagementAPIDelegate::GetLaunchType(
197 const extensions::ExtensionPrefs* prefs, 195 const extensions::ExtensionPrefs* prefs,
198 const extensions::Extension* extension) const { 196 const extensions::Extension* extension) const {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 335
338 GURL ChromeManagementAPIDelegate::GetIconURL( 336 GURL ChromeManagementAPIDelegate::GetIconURL(
339 const extensions::Extension* extension, 337 const extensions::Extension* extension,
340 int icon_size, 338 int icon_size,
341 ExtensionIconSet::MatchType match, 339 ExtensionIconSet::MatchType match,
342 bool grayscale, 340 bool grayscale,
343 bool* exists) const { 341 bool* exists) const {
344 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size, 342 return extensions::ExtensionIconSource::GetIconURL(extension, icon_size,
345 match, grayscale, exists); 343 match, grayscale, exists);
346 } 344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698