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

Side by Side Diff: chrome/browser/extensions/external_extension_provider_impl.cc

Issue 9963120: Introduces an additional extension loader that load extra extensions based on per-extension json fi… (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/external_extension_provider_impl.h" 5 #include "chrome/browser/extensions/external_extension_provider_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 21 matching lines...) Expand all
32 #endif 32 #endif
33 33
34 #if !defined(OS_CHROMEOS) 34 #if !defined(OS_CHROMEOS)
35 #include "chrome/browser/extensions/default_apps.h" 35 #include "chrome/browser/extensions/default_apps.h"
36 #endif 36 #endif
37 37
38 #if defined(OS_WIN) 38 #if defined(OS_WIN)
39 #include "chrome/browser/extensions/external_registry_extension_loader_win.h" 39 #include "chrome/browser/extensions/external_registry_extension_loader_win.h"
40 #endif 40 #endif
41 41
42 #if defined(OS_LINUX)
Sam Kerner (Chrome) 2012/04/13 19:35:13 You only use this include on non-chrome os linux,
Alexandre Abreu 2012/04/13 21:52:38 Done.
43 #include "chrome/browser/extensions/external_filesystem_extension_loader_linux.h "
Sam Kerner (Chrome) 2012/04/13 19:35:13 Includes should be in alphabetical order, so this
Alexandre Abreu 2012/04/13 21:52:38 Done.
44 #endif
45
42 using content::BrowserThread; 46 using content::BrowserThread;
43 47
44 // Constants for keeping track of extension preferences in a dictionary. 48 // Constants for keeping track of extension preferences in a dictionary.
45 const char ExternalExtensionProviderImpl::kExternalCrx[] = "external_crx"; 49 const char ExternalExtensionProviderImpl::kExternalCrx[] = "external_crx";
46 const char ExternalExtensionProviderImpl::kExternalVersion[] = 50 const char ExternalExtensionProviderImpl::kExternalVersion[] =
47 "external_version"; 51 "external_version";
48 const char ExternalExtensionProviderImpl::kExternalUpdateUrl[] = 52 const char ExternalExtensionProviderImpl::kExternalUpdateUrl[] =
49 "external_update_url"; 53 "external_update_url";
50 const char ExternalExtensionProviderImpl::kSupportedLocales[] = 54 const char ExternalExtensionProviderImpl::kSupportedLocales[] =
51 "supported_locales"; 55 "supported_locales";
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 #if defined(OS_WIN) 352 #if defined(OS_WIN)
349 provider_list->push_back( 353 provider_list->push_back(
350 linked_ptr<ExternalExtensionProviderInterface>( 354 linked_ptr<ExternalExtensionProviderInterface>(
351 new ExternalExtensionProviderImpl( 355 new ExternalExtensionProviderImpl(
352 service, 356 service,
353 new ExternalRegistryExtensionLoader, 357 new ExternalRegistryExtensionLoader,
354 Extension::EXTERNAL_REGISTRY, 358 Extension::EXTERNAL_REGISTRY,
355 Extension::INVALID, 359 Extension::INVALID,
356 Extension::NO_FLAGS))); 360 Extension::NO_FLAGS)));
357 #endif 361 #endif
362
363 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
364 provider_list->push_back(
365 linked_ptr<ExternalExtensionProviderInterface>(
366 new ExternalExtensionProviderImpl(
367 service,
Sam Kerner (Chrome) 2012/04/13 19:35:13 Consider passing in the path constant to the const
Alexandre Abreu 2012/04/13 21:52:38 Done.
368 new ExternalFilesystemExtensionLoader,
369 Extension::EXTERNAL_PREF,
370 Extension::EXTERNAL_PREF_DOWNLOAD,
371 Extension::NO_FLAGS)));
372 #endif
373
358 provider_list->push_back( 374 provider_list->push_back(
359 linked_ptr<ExternalExtensionProviderInterface>( 375 linked_ptr<ExternalExtensionProviderInterface>(
360 new ExternalExtensionProviderImpl( 376 new ExternalExtensionProviderImpl(
361 service, 377 service,
362 new ExternalPolicyExtensionLoader(profile), 378 new ExternalPolicyExtensionLoader(profile),
363 Extension::INVALID, 379 Extension::INVALID,
364 Extension::EXTERNAL_POLICY_DOWNLOAD, 380 Extension::EXTERNAL_POLICY_DOWNLOAD,
365 Extension::NO_FLAGS))); 381 Extension::NO_FLAGS)));
366 382
367 #if !defined(OS_CHROMEOS) 383 #if !defined(OS_CHROMEOS)
(...skipping 21 matching lines...) Expand all
389 linked_ptr<ExternalExtensionProviderInterface>( 405 linked_ptr<ExternalExtensionProviderInterface>(
390 new ExternalExtensionProviderImpl( 406 new ExternalExtensionProviderImpl(
391 service, 407 service,
392 connector->GetAppPackUpdater()->CreateExternalExtensionLoader(), 408 connector->GetAppPackUpdater()->CreateExternalExtensionLoader(),
393 Extension::EXTERNAL_PREF, 409 Extension::EXTERNAL_PREF,
394 Extension::INVALID, 410 Extension::INVALID,
395 Extension::NO_FLAGS))); 411 Extension::NO_FLAGS)));
396 } 412 }
397 #endif 413 #endif
398 } 414 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698