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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 330843002: Make the policy fetch for first time login blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and modified existing leak suppression to account for symbol changes Created 6 years, 5 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
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/chromeos/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 store.get(), 84 store.get(),
85 task_runner, 85 task_runner,
86 file_task_runner, 86 file_task_runner,
87 io_task_runner), 87 io_task_runner),
88 store_(store.Pass()), 88 store_(store.Pass()),
89 external_data_manager_(external_data_manager.Pass()), 89 external_data_manager_(external_data_manager.Pass()),
90 component_policy_cache_path_(component_policy_cache_path), 90 component_policy_cache_path_(component_policy_cache_path),
91 wait_for_policy_fetch_(wait_for_policy_fetch), 91 wait_for_policy_fetch_(wait_for_policy_fetch),
92 policy_fetch_timeout_(false, false) { 92 policy_fetch_timeout_(false, false) {
93 time_init_started_ = base::Time::Now(); 93 time_init_started_ = base::Time::Now();
94 if (wait_for_policy_fetch_) { 94 if (wait_for_policy_fetch_ && !initial_policy_fetch_timeout.is_max()) {
95 policy_fetch_timeout_.Start( 95 policy_fetch_timeout_.Start(
96 FROM_HERE, 96 FROM_HERE,
97 initial_policy_fetch_timeout, 97 initial_policy_fetch_timeout,
98 base::Bind(&UserCloudPolicyManagerChromeOS::OnBlockingFetchTimeout, 98 base::Bind(&UserCloudPolicyManagerChromeOS::OnBlockingFetchTimeout,
99 base::Unretained(this))); 99 base::Unretained(this)));
100 } 100 }
101 } 101 }
102 102
103 UserCloudPolicyManagerChromeOS::~UserCloudPolicyManagerChromeOS() {} 103 UserCloudPolicyManagerChromeOS::~UserCloudPolicyManagerChromeOS() {}
104 104
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // OnComponentCloudPolicyUpdated() once it's ready. 388 // OnComponentCloudPolicyUpdated() once it's ready.
389 return; 389 return;
390 } 390 }
391 391
392 core()->StartRefreshScheduler(); 392 core()->StartRefreshScheduler();
393 core()->TrackRefreshDelayPref(local_state_, 393 core()->TrackRefreshDelayPref(local_state_,
394 policy_prefs::kUserPolicyRefreshRate); 394 policy_prefs::kUserPolicyRefreshRate);
395 } 395 }
396 396
397 } // namespace policy 397 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698