OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 6 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
7 #include "chrome/browser/policy/device_management_policy_provider.h" | 7 #include "chrome/browser/policy/device_management_policy_provider.h" |
8 #include "chrome/browser/policy/device_management_service.h" | 8 #include "chrome/browser/policy/device_management_service.h" |
9 #include "chrome/browser/policy/profile_policy_context.h" | 9 #include "chrome/browser/policy/profile_policy_context.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 | 12 |
13 namespace policy { | 13 namespace policy { |
14 | 14 |
15 ProfilePolicyContext::ProfilePolicyContext(Profile* profile) | 15 ProfilePolicyContext::ProfilePolicyContext(Profile* profile) |
16 : profile_(profile) { | 16 : profile_(profile) { |
17 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 17 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
18 if (command_line->HasSwitch(switches::kDeviceManagementUrl)) { | 18 if (command_line->HasSwitch(switches::kDeviceManagementUrl)) { |
19 device_management_service_.reset(new DeviceManagementService( | 19 device_management_service_.reset(new DeviceManagementService( |
20 command_line->GetSwitchValueASCII(switches::kDeviceManagementUrl))); | 20 command_line->GetSwitchValueASCII(switches::kDeviceManagementUrl))); |
(...skipping 21 matching lines...) Expand all Loading... |
42 if (device_management_policy_provider_.get()) | 42 if (device_management_policy_provider_.get()) |
43 device_management_policy_provider_->Shutdown(); | 43 device_management_policy_provider_->Shutdown(); |
44 } | 44 } |
45 | 45 |
46 DeviceManagementPolicyProvider* | 46 DeviceManagementPolicyProvider* |
47 ProfilePolicyContext::GetDeviceManagementPolicyProvider() { | 47 ProfilePolicyContext::GetDeviceManagementPolicyProvider() { |
48 return device_management_policy_provider_.get(); | 48 return device_management_policy_provider_.get(); |
49 } | 49 } |
50 | 50 |
51 } // namespace policy | 51 } // namespace policy |
OLD | NEW |