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

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

Issue 2805923002: Enable settings hardening on OSX when no Finch config is present (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | chrome/browser/prefs/chrome_pref_service_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void SetUpCommandLine(base::CommandLine* command_line) override { 60 void SetUpCommandLine(base::CommandLine* command_line) override {
61 if (load_extensions_.empty()) { 61 if (load_extensions_.empty()) {
62 // If no |load_extensions_| were specified, allow unauthenticated 62 // If no |load_extensions_| were specified, allow unauthenticated
63 // extension settings to be loaded from Preferences as if they had been 63 // extension settings to be loaded from Preferences as if they had been
64 // authenticated correctly before they were handed to the ExtensionSystem. 64 // authenticated correctly before they were handed to the ExtensionSystem.
65 command_line->AppendSwitchASCII( 65 command_line->AppendSwitchASCII(
66 switches::kForceFieldTrials, 66 switches::kForceFieldTrials,
67 base::StringPrintf( 67 base::StringPrintf(
68 "%s/%s/", chrome_prefs::internals::kSettingsEnforcementTrialName, 68 "%s/%s/", chrome_prefs::internals::kSettingsEnforcementTrialName,
69 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement)); 69 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement));
70 #if defined(OFFICIAL_BUILD) && defined(OS_WIN) 70 #if defined(OFFICIAL_BUILD) && (defined(OS_WIN) || defined(OS_MACOSX))
71 // In Windows official builds, it is not possible to disable settings 71 // In Windows and MacOS official builds, it is not possible to disable
72 // authentication. 72 // settings enforcement.
73 unauthenticated_load_allowed_ = false; 73 unauthenticated_load_allowed_ = false;
74 #endif 74 #endif
75 } else { 75 } else {
76 base::FilePath::StringType paths = base::JoinString( 76 base::FilePath::StringType paths = base::JoinString(
77 load_extensions_, base::FilePath::StringType(1, ',')); 77 load_extensions_, base::FilePath::StringType(1, ','));
78 command_line->AppendSwitchNative(switches::kLoadExtension, paths); 78 command_line->AppendSwitchNative(switches::kLoadExtension, paths);
79 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck); 79 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck);
80 } 80 }
81 } 81 }
82 82
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } else if (extension->name() == "App Test") { 396 } else if (extension->name() == "App Test") {
397 is_app_test_extension_enabled = true; 397 is_app_test_extension_enabled = true;
398 } else { 398 } else {
399 EXPECT_TRUE( 399 EXPECT_TRUE(
400 extensions::Manifest::IsComponentLocation(extension->location())); 400 extensions::Manifest::IsComponentLocation(extension->location()));
401 } 401 }
402 } 402 }
403 EXPECT_TRUE(is_app_dot_com_extension_enabled); 403 EXPECT_TRUE(is_app_dot_com_extension_enabled);
404 EXPECT_TRUE(is_app_test_extension_enabled); 404 EXPECT_TRUE(is_app_test_extension_enabled);
405 } 405 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/chrome_pref_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698