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

Unified Diff: chrome/browser/extensions/external_provider_impl.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/external_provider_impl.cc
diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc
index 963ccc4b95c3bd12e72f9d79b885899b88c510e5..6a841933bd01563713a92b2bf822a3ab574a6a50 100644
--- a/chrome/browser/extensions/external_provider_impl.cc
+++ b/chrome/browser/extensions/external_provider_impl.cc
@@ -465,7 +465,9 @@ void ExternalProviderImpl::CreateExternalProviders(
#endif
bool is_chromeos_demo_session = false;
+#if !defined(OS_WIN)
int bundled_extension_creation_flags = Extension::NO_FLAGS;
+#endif
#if defined(OS_CHROMEOS)
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
is_chromeos_demo_session =
@@ -473,26 +475,7 @@ void ExternalProviderImpl::CreateExternalProviders(
connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK;
bundled_extension_creation_flags = Extension::FROM_WEBSTORE |
Extension::WAS_INSTALLED_BY_DEFAULT;
-#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- if (!profile->IsSupervised()) {
- provider_list->push_back(
- linked_ptr<ExternalProviderInterface>(
- new ExternalProviderImpl(
- service,
- new ExternalPrefLoader(
- chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS,
- ExternalPrefLoader::NONE,
- NULL),
- profile,
- Manifest::EXTERNAL_PREF,
- Manifest::EXTERNAL_PREF_DOWNLOAD,
- bundled_extension_creation_flags)));
- }
-#endif
-
-#if defined(OS_CHROMEOS)
if (!is_chromeos_demo_session && !is_chrome_os_public_session) {
int external_apps_path_id = profile->IsSupervised() ?
chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS :
@@ -538,10 +521,35 @@ void ExternalProviderImpl::CreateExternalProviders(
Manifest::INVALID_LOCATION,
Extension::NO_FLAGS)));
}
+#elif defined(OS_LINUX)
+ if (!profile->IsSupervised()) {
+ provider_list->push_back(
+ linked_ptr<ExternalProviderInterface>(
+ new ExternalProviderImpl(
+ service,
+ new ExternalPrefLoader(
+ chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS,
+ ExternalPrefLoader::NONE,
+ NULL),
+ profile,
+ Manifest::EXTERNAL_PREF,
+ Manifest::EXTERNAL_PREF_DOWNLOAD,
+ bundled_extension_creation_flags)));
+ }
#endif
if (!profile->IsSupervised() && !is_chromeos_demo_session) {
-#if !defined(OS_WIN)
+#if defined(OS_WIN)
+ provider_list->push_back(
+ linked_ptr<ExternalProviderInterface>(
+ new ExternalProviderImpl(
+ service,
+ new ExternalRegistryLoader,
+ profile,
+ Manifest::EXTERNAL_REGISTRY,
+ Manifest::EXTERNAL_PREF_DOWNLOAD,
+ Extension::NO_FLAGS)));
+#else
provider_list->push_back(
linked_ptr<ExternalProviderInterface>(
new ExternalProviderImpl(
@@ -553,7 +561,6 @@ void ExternalProviderImpl::CreateExternalProviders(
Manifest::EXTERNAL_PREF,
Manifest::EXTERNAL_PREF_DOWNLOAD,
bundled_extension_creation_flags)));
-#endif
// Define a per-user source of external extensions.
#if defined(OS_MACOSX)
@@ -569,17 +576,6 @@ void ExternalProviderImpl::CreateExternalProviders(
Manifest::EXTERNAL_PREF_DOWNLOAD,
Extension::NO_FLAGS)));
#endif
-
-#if defined(OS_WIN)
- provider_list->push_back(
- linked_ptr<ExternalProviderInterface>(
- new ExternalProviderImpl(
- service,
- new ExternalRegistryLoader,
- profile,
- Manifest::EXTERNAL_REGISTRY,
- Manifest::EXTERNAL_PREF_DOWNLOAD,
- Extension::NO_FLAGS)));
#endif
#if !defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698