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

Unified Diff: chrome/browser/policy/cloud_policy_provider.cc

Issue 10823212: Relanding this as this did not fix the chromiumos breakage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/cloud_policy_client.cc ('k') | chrome/browser/policy/cloud_policy_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_provider.cc
===================================================================
--- chrome/browser/policy/cloud_policy_provider.cc (revision 150399)
+++ chrome/browser/policy/cloud_policy_provider.cc (working copy)
@@ -4,10 +4,12 @@
#include "chrome/browser/policy/cloud_policy_provider.h"
+#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/policy/policy_bundle.h"
#include "chrome/browser/policy/policy_map.h"
+#include "chrome/common/chrome_switches.h"
namespace policy {
@@ -83,6 +85,14 @@
if (!initialization_complete_) {
initialization_complete_ = true;
for (size_t i = 0; i < CACHE_SIZE; ++i) {
+#if defined(OS_CHROMEOS)
+ // Ignore the device policy cache if device policy is not enabled.
+ if (i == CACHE_DEVICE &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableDevicePolicy)) {
+ continue;
+ }
+#endif
if (caches_[i] == NULL || !caches_[i]->IsReady()) {
initialization_complete_ = false;
break;
« no previous file with comments | « chrome/browser/policy/cloud_policy_client.cc ('k') | chrome/browser/policy/cloud_policy_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698