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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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_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"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 new ExternalProviderImpl(service, 441 new ExternalProviderImpl(service,
442 external_recommended_loader, 442 external_recommended_loader,
443 profile, 443 profile,
444 crx_location, 444 crx_location,
445 Manifest::EXTERNAL_PREF_DOWNLOAD, 445 Manifest::EXTERNAL_PREF_DOWNLOAD,
446 Extension::NO_FLAGS))); 446 Extension::NO_FLAGS)));
447 } 447 }
448 448
449 // In tests don't install extensions from default external sources. 449 // In tests don't install extensions from default external sources.
450 // It would only slowdown tests and make them flaky. 450 // It would only slowdown tests and make them flaky.
451 if (CommandLine::ForCurrentProcess()->HasSwitch( 451 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
452 switches::kDisableDefaultApps)) 452 switches::kDisableDefaultApps))
453 return; 453 return;
454 454
455 // On Mac OS, items in /Library/... should be written by the superuser. 455 // On Mac OS, items in /Library/... should be written by the superuser.
456 // Check that all components of the path are writable by root only. 456 // Check that all components of the path are writable by root only.
457 ExternalPrefLoader::Options check_admin_permissions_on_mac; 457 ExternalPrefLoader::Options check_admin_permissions_on_mac;
458 #if defined(OS_MACOSX) 458 #if defined(OS_MACOSX)
459 check_admin_permissions_on_mac = 459 check_admin_permissions_on_mac =
460 ExternalPrefLoader::ENSURE_PATH_CONTROLLED_BY_ADMIN; 460 ExternalPrefLoader::ENSURE_PATH_CONTROLLED_BY_ADMIN;
461 #else 461 #else
462 check_admin_permissions_on_mac = ExternalPrefLoader::NONE; 462 check_admin_permissions_on_mac = ExternalPrefLoader::NONE;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 service, 580 service,
581 new ExternalComponentLoader(profile), 581 new ExternalComponentLoader(profile),
582 profile, 582 profile,
583 Manifest::INVALID_LOCATION, 583 Manifest::INVALID_LOCATION,
584 Manifest::EXTERNAL_COMPONENT, 584 Manifest::EXTERNAL_COMPONENT,
585 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); 585 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT)));
586 } 586 }
587 } 587 }
588 588
589 } // namespace extensions 589 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698