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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 10377115: Refactored NetworkConfigurationUpdater to read policy from the PolicyService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 8 years, 7 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/policy/network_configuration_updater.h » ('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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/network_configuration_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698