| OLD | NEW |
| 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_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/linked_ptr.h" | 13 #include "base/memory/linked_ptr.h" |
| 14 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/trace_event/trace_event.h" |
| 16 #include "base/values.h" | 17 #include "base/values.h" |
| 17 #include "base/version.h" | 18 #include "base/version.h" |
| 18 #include "chrome/browser/app_mode/app_mode_utils.h" | 19 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 19 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/extensions/extension_management.h" | 21 #include "chrome/browser/extensions/extension_management.h" |
| 21 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/extensions/external_component_loader.h" | 23 #include "chrome/browser/extensions/external_component_loader.h" |
| 23 #include "chrome/browser/extensions/external_policy_loader.h" | 24 #include "chrome/browser/extensions/external_policy_loader.h" |
| 24 #include "chrome/browser/extensions/external_pref_loader.h" | 25 #include "chrome/browser/extensions/external_pref_loader.h" |
| 25 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 *location = loc; | 356 *location = loc; |
| 356 | 357 |
| 357 return true; | 358 return true; |
| 358 } | 359 } |
| 359 | 360 |
| 360 // static | 361 // static |
| 361 void ExternalProviderImpl::CreateExternalProviders( | 362 void ExternalProviderImpl::CreateExternalProviders( |
| 362 VisitorInterface* service, | 363 VisitorInterface* service, |
| 363 Profile* profile, | 364 Profile* profile, |
| 364 ProviderCollection* provider_list) { | 365 ProviderCollection* provider_list) { |
| 366 TRACE_EVENT0("browser,startup", |
| 367 "ExternalProviderImpl::CreateExternalProviders"); |
| 365 scoped_refptr<ExternalLoader> external_loader; | 368 scoped_refptr<ExternalLoader> external_loader; |
| 366 scoped_refptr<ExternalLoader> external_recommended_loader; | 369 scoped_refptr<ExternalLoader> external_recommended_loader; |
| 367 extensions::Manifest::Location crx_location = Manifest::INVALID_LOCATION; | 370 extensions::Manifest::Location crx_location = Manifest::INVALID_LOCATION; |
| 368 #if defined(OS_CHROMEOS) | 371 #if defined(OS_CHROMEOS) |
| 369 policy::BrowserPolicyConnectorChromeOS* connector = | 372 policy::BrowserPolicyConnectorChromeOS* connector = |
| 370 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 373 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 371 bool is_chrome_os_public_session = false; | 374 bool is_chrome_os_public_session = false; |
| 372 const user_manager::User* user = | 375 const user_manager::User* user = |
| 373 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 376 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
| 374 policy::DeviceLocalAccount::Type account_type; | 377 policy::DeviceLocalAccount::Type account_type; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 new ExternalProviderImpl( | 580 new ExternalProviderImpl( |
| 578 service, | 581 service, |
| 579 new ExternalComponentLoader(profile), | 582 new ExternalComponentLoader(profile), |
| 580 profile, | 583 profile, |
| 581 Manifest::INVALID_LOCATION, | 584 Manifest::INVALID_LOCATION, |
| 582 Manifest::EXTERNAL_COMPONENT, | 585 Manifest::EXTERNAL_COMPONENT, |
| 583 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); | 586 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
| 584 } | 587 } |
| 585 | 588 |
| 586 } // namespace extensions | 589 } // namespace extensions |
| OLD | NEW |