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/policy/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 this, | 129 this, |
130 GetChromePolicyDefinitionList(), | 130 GetChromePolicyDefinitionList(), |
131 POLICY_LEVEL_RECOMMENDED)); | 131 POLICY_LEVEL_RECOMMENDED)); |
132 } | 132 } |
133 | 133 |
134 InitializeDevicePolicy(); | 134 InitializeDevicePolicy(); |
135 | 135 |
136 if (command_line->HasSwitch(switches::kEnableONCPolicy)) { | 136 if (command_line->HasSwitch(switches::kEnableONCPolicy)) { |
137 network_configuration_updater_.reset( | 137 network_configuration_updater_.reset( |
138 new NetworkConfigurationUpdater( | 138 new NetworkConfigurationUpdater( |
139 managed_cloud_provider_.get(), | 139 g_browser_process->policy_service(), |
140 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); | 140 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); |
141 } | 141 } |
142 | 142 |
143 // Create the AppPackUpdater to start updating the cache. It requires the | 143 // Create the AppPackUpdater to start updating the cache. It requires the |
144 // system request context, which isn't available yet; therefore it is | 144 // system request context, which isn't available yet; therefore it is |
145 // created only once the loops are running. | 145 // created only once the loops are running. |
146 MessageLoop::current()->PostTask( | 146 MessageLoop::current()->PostTask( |
147 FROM_HERE, | 147 FROM_HERE, |
148 base::Bind(base::IgnoreResult(&BrowserPolicyConnector::GetAppPackUpdater), | 148 base::Bind(base::IgnoreResult(&BrowserPolicyConnector::GetAppPackUpdater), |
149 weak_ptr_factory_.GetWeakPtr())); | 149 weak_ptr_factory_.GetWeakPtr())); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); | 547 config_dir_path.Append(FILE_PATH_LITERAL("recommended"))); |
548 } else { | 548 } else { |
549 return NULL; | 549 return NULL; |
550 } | 550 } |
551 #else | 551 #else |
552 return NULL; | 552 return NULL; |
553 #endif | 553 #endif |
554 } | 554 } |
555 | 555 |
556 } // namespace policy | 556 } // namespace policy |
OLD | NEW |