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

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

Issue 49773003: ChromeOS: Remove MockDBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 7 years, 1 month 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
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/enterprise_install_attributes.h" 5 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 const char EnterpriseInstallAttributes::kAttrEnterpriseUser[] = 87 const char EnterpriseInstallAttributes::kAttrEnterpriseUser[] =
88 "enterprise.user"; 88 "enterprise.user";
89 const char EnterpriseInstallAttributes::kAttrConsumerKioskEnabled[] = 89 const char EnterpriseInstallAttributes::kAttrConsumerKioskEnabled[] =
90 "consumer.app_kiosk_enabled"; 90 "consumer.app_kiosk_enabled";
91 91
92 EnterpriseInstallAttributes::EnterpriseInstallAttributes( 92 EnterpriseInstallAttributes::EnterpriseInstallAttributes(
93 chromeos::CryptohomeClient* cryptohome_client) 93 chromeos::CryptohomeClient* cryptohome_client)
94 : device_locked_(false), 94 : device_locked_(false),
95 registration_mode_(DEVICE_MODE_PENDING), 95 registration_mode_(DEVICE_MODE_PENDING),
96 cryptohome_client_(cryptohome_client), 96 cryptohome_client_(cryptohome_client),
97 weak_ptr_factory_(this) {} 97 weak_ptr_factory_(this) {
98 }
98 99
99 EnterpriseInstallAttributes::~EnterpriseInstallAttributes() {} 100 EnterpriseInstallAttributes::~EnterpriseInstallAttributes() {}
100 101
101 void EnterpriseInstallAttributes::ReadCacheFile( 102 void EnterpriseInstallAttributes::ReadCacheFile(
102 const base::FilePath& cache_file) { 103 const base::FilePath& cache_file) {
103 if (device_locked_ || !base::PathExists(cache_file)) 104 if (device_locked_ || !base::PathExists(cache_file))
104 return; 105 return;
105 106
106 device_locked_ = true; 107 device_locked_ = true;
107 108
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 &consumer_kiosk_enabled) && 366 &consumer_kiosk_enabled) &&
366 consumer_kiosk_enabled == "true") { 367 consumer_kiosk_enabled == "true") {
367 registration_mode_ = DEVICE_MODE_CONSUMER_KIOSK; 368 registration_mode_ = DEVICE_MODE_CONSUMER_KIOSK;
368 } else if (enterprise_user.empty() && enterprise_owned != "true") { 369 } else if (enterprise_user.empty() && enterprise_owned != "true") {
369 // |registration_user_| is empty on consumer devices. 370 // |registration_user_| is empty on consumer devices.
370 registration_mode_ = DEVICE_MODE_CONSUMER; 371 registration_mode_ = DEVICE_MODE_CONSUMER;
371 } 372 }
372 } 373 }
373 374
374 } // namespace policy 375 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698