OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extension_util.h" | 5 #include "chrome/browser/extensions/extension_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 std::unique_ptr<base::DictionaryValue> GetExtensionInfo( | 304 std::unique_ptr<base::DictionaryValue> GetExtensionInfo( |
305 const Extension* extension) { | 305 const Extension* extension) { |
306 DCHECK(extension); | 306 DCHECK(extension); |
307 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue); | 307 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue); |
308 | 308 |
309 dict->SetString("id", extension->id()); | 309 dict->SetString("id", extension->id()); |
310 dict->SetString("name", extension->name()); | 310 dict->SetString("name", extension->name()); |
311 | 311 |
312 GURL icon = extensions::ExtensionIconSource::GetIconURL( | 312 GURL icon = extensions::ExtensionIconSource::GetIconURL( |
313 extension, | 313 extension, extension_misc::EXTENSION_ICON_SMALLISH, |
314 extension_misc::EXTENSION_ICON_SMALLISH, | |
315 ExtensionIconSet::MATCH_BIGGER, | 314 ExtensionIconSet::MATCH_BIGGER, |
316 false, // Not grayscale. | 315 false); // Not grayscale. |
317 NULL); // Don't set bool if exists. | |
318 dict->SetString("icon", icon.spec()); | 316 dict->SetString("icon", icon.spec()); |
319 | 317 |
320 return dict; | 318 return dict; |
321 } | 319 } |
322 | 320 |
323 const gfx::ImageSkia& GetDefaultAppIcon() { | 321 const gfx::ImageSkia& GetDefaultAppIcon() { |
324 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 322 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
325 IDR_APP_DEFAULT_ICON); | 323 IDR_APP_DEFAULT_ICON); |
326 } | 324 } |
327 | 325 |
(...skipping 21 matching lines...) Expand all Loading... |
349 #endif | 347 #endif |
350 } | 348 } |
351 | 349 |
352 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { | 350 bool IsExtensionSupervised(const Extension* extension, Profile* profile) { |
353 return WasInstalledByCustodian(extension->id(), profile) && | 351 return WasInstalledByCustodian(extension->id(), profile) && |
354 profile->IsSupervised(); | 352 profile->IsSupervised(); |
355 } | 353 } |
356 | 354 |
357 } // namespace util | 355 } // namespace util |
358 } // namespace extensions | 356 } // namespace extensions |
OLD | NEW |