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

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

Issue 99433004: Add a header when fetching pages under the DMServer URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed per willchan's feedback Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc » ('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/chromeos/policy/auto_enrollment_client.h" 5 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 should_auto_enroll_(false), 98 should_auto_enroll_(false),
99 device_id_(base::GenerateGUID()), 99 device_id_(base::GenerateGUID()),
100 power_initial_(power_initial), 100 power_initial_(power_initial),
101 power_limit_(power_limit), 101 power_limit_(power_limit),
102 requests_sent_(0), 102 requests_sent_(0),
103 device_management_service_(service), 103 device_management_service_(service),
104 local_state_(local_state) { 104 local_state_(local_state) {
105 request_context_ = new SystemPolicyRequestContext( 105 request_context_ = new SystemPolicyRequestContext(
106 system_request_context, 106 system_request_context,
107 content::GetUserAgent( 107 content::GetUserAgent(
108 GURL(device_management_service_->GetServerURL()))); 108 GURL(device_management_service_->GetServerUrl())));
109 109
110 DCHECK_LE(power_initial_, power_limit_); 110 DCHECK_LE(power_initial_, power_limit_);
111 DCHECK(!completion_callback_.is_null()); 111 DCHECK(!completion_callback_.is_null());
112 if (!serial_number.empty()) 112 if (!serial_number.empty())
113 serial_number_hash_ = crypto::SHA256HashString(serial_number); 113 serial_number_hash_ = crypto::SHA256HashString(serial_number);
114 net::NetworkChangeNotifier::AddNetworkChangeObserver(this); 114 net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
115 } 115 }
116 116
117 AutoEnrollmentClient::~AutoEnrollmentClient() { 117 AutoEnrollmentClient::~AutoEnrollmentClient() {
118 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); 118 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 request_job_.reset(); 387 request_job_.reset();
388 time_start_ = base::Time(); 388 time_start_ = base::Time();
389 389
390 if (completion_callback_.is_null()) { 390 if (completion_callback_.is_null()) {
391 // CancelAndDeleteSoon() was invoked before. 391 // CancelAndDeleteSoon() was invoked before.
392 base::MessageLoopProxy::current()->DeleteSoon(FROM_HERE, this); 392 base::MessageLoopProxy::current()->DeleteSoon(FROM_HERE, this);
393 } 393 }
394 } 394 }
395 395
396 } // namespace policy 396 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698