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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 return USER_AFFILIATION_MANAGED; | 318 return USER_AFFILIATION_MANAGED; |
319 } | 319 } |
320 #endif | 320 #endif |
321 | 321 |
322 return USER_AFFILIATION_NONE; | 322 return USER_AFFILIATION_NONE; |
323 } | 323 } |
324 | 324 |
325 #if defined(OS_CHROMEOS) | 325 #if defined(OS_CHROMEOS) |
326 AppPackUpdater* BrowserPolicyConnector::GetAppPackUpdater() { | 326 AppPackUpdater* BrowserPolicyConnector::GetAppPackUpdater() { |
327 // request_context_ is NULL in unit tests. | 327 // request_context_ is NULL in unit tests. |
328 if (!app_pack_updater_ && request_context_) { | 328 if (!app_pack_updater_ && request_context_.get()) { |
329 app_pack_updater_.reset( | 329 app_pack_updater_.reset( |
330 new AppPackUpdater(request_context_, install_attributes_.get())); | 330 new AppPackUpdater(request_context_.get(), install_attributes_.get())); |
331 } | 331 } |
332 return app_pack_updater_.get(); | 332 return app_pack_updater_.get(); |
333 } | 333 } |
334 | 334 |
335 NetworkConfigurationUpdater* | 335 NetworkConfigurationUpdater* |
336 BrowserPolicyConnector::GetNetworkConfigurationUpdater() { | 336 BrowserPolicyConnector::GetNetworkConfigurationUpdater() { |
337 if (!network_configuration_updater_) { | 337 if (!network_configuration_updater_) { |
338 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 338 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
339 if (command_line->HasSwitch( | 339 if (command_line->HasSwitch( |
340 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { | 340 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 return new AsyncPolicyProvider(loader.Pass()); | 488 return new AsyncPolicyProvider(loader.Pass()); |
489 } else { | 489 } else { |
490 return NULL; | 490 return NULL; |
491 } | 491 } |
492 #else | 492 #else |
493 return NULL; | 493 return NULL; |
494 #endif | 494 #endif |
495 } | 495 } |
496 | 496 |
497 } // namespace policy | 497 } // namespace policy |
OLD | NEW |