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

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 17 matching lines...) Expand all
28 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
29 #include "chrome/browser/chromeos/login/user_manager.h" 29 #include "chrome/browser/chromeos/login/user_manager.h"
30 #include "chrome/browser/policy/app_pack_updater.h" 30 #include "chrome/browser/policy/app_pack_updater.h"
31 #include "chrome/browser/policy/browser_policy_connector.h" 31 #include "chrome/browser/policy/browser_policy_connector.h"
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_LINUX) && !defined(OS_CHROMEOS)
39 #include "chrome/browser/extensions/external_filesystem_extension_loader_linux.h "
40 #endif
41
38 #if defined(OS_WIN) 42 #if defined(OS_WIN)
39 #include "chrome/browser/extensions/external_registry_extension_loader_win.h" 43 #include "chrome/browser/extensions/external_registry_extension_loader_win.h"
40 #endif 44 #endif
41 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";
(...skipping 300 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,
368 new ExternalFilesystemExtensionLoader(
Finnur 2012/04/25 13:33:45 As mentioned, I think a new loader is not required
369 chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS),
370 Extension::EXTERNAL_PREF,
371 Extension::EXTERNAL_PREF_DOWNLOAD,
372 Extension::NO_FLAGS)));
373 #endif
374
358 provider_list->push_back( 375 provider_list->push_back(
359 linked_ptr<ExternalExtensionProviderInterface>( 376 linked_ptr<ExternalExtensionProviderInterface>(
360 new ExternalExtensionProviderImpl( 377 new ExternalExtensionProviderImpl(
361 service, 378 service,
362 new ExternalPolicyExtensionLoader(profile), 379 new ExternalPolicyExtensionLoader(profile),
363 Extension::INVALID, 380 Extension::INVALID,
364 Extension::EXTERNAL_POLICY_DOWNLOAD, 381 Extension::EXTERNAL_POLICY_DOWNLOAD,
365 Extension::NO_FLAGS))); 382 Extension::NO_FLAGS)));
366 383
367 #if !defined(OS_CHROMEOS) 384 #if !defined(OS_CHROMEOS)
(...skipping 21 matching lines...) Expand all
389 linked_ptr<ExternalExtensionProviderInterface>( 406 linked_ptr<ExternalExtensionProviderInterface>(
390 new ExternalExtensionProviderImpl( 407 new ExternalExtensionProviderImpl(
391 service, 408 service,
392 connector->GetAppPackUpdater()->CreateExternalExtensionLoader(), 409 connector->GetAppPackUpdater()->CreateExternalExtensionLoader(),
393 Extension::EXTERNAL_PREF, 410 Extension::EXTERNAL_PREF,
394 Extension::INVALID, 411 Extension::INVALID,
395 Extension::NO_FLAGS))); 412 Extension::NO_FLAGS)));
396 } 413 }
397 #endif 414 #endif
398 } 415 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698