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

Side by Side Diff: chrome/browser/chromeos/ownership/owner_settings_service.cc

Issue 494093002: OwnerKeyUtil is moved to components/ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ownership/owner_settings_service.h" 5 #include "chrome/browser/chromeos/ownership/owner_settings_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 13 matching lines...) Expand all
24 #include "content/public/common/content_switches.h" 24 #include "content/public/common/content_switches.h"
25 #include "crypto/nss_util.h" 25 #include "crypto/nss_util.h"
26 #include "crypto/nss_util_internal.h" 26 #include "crypto/nss_util_internal.h"
27 #include "crypto/rsa_private_key.h" 27 #include "crypto/rsa_private_key.h"
28 #include "crypto/scoped_nss_types.h" 28 #include "crypto/scoped_nss_types.h"
29 #include "crypto/signature_creator.h" 29 #include "crypto/signature_creator.h"
30 30
31 namespace em = enterprise_management; 31 namespace em = enterprise_management;
32 32
33 using content::BrowserThread; 33 using content::BrowserThread;
34 using ownership::OwnerKeyUtil;
35 using ownership::PrivateKey;
36 using ownership::PublicKey;
34 37
35 namespace chromeos { 38 namespace chromeos {
36 39
37 namespace { 40 namespace {
38 41
39 scoped_refptr<OwnerKeyUtil>* g_owner_key_util_for_testing = NULL; 42 scoped_refptr<OwnerKeyUtil>* g_owner_key_util_for_testing = NULL;
40 DeviceSettingsService* g_device_settings_service_for_testing = NULL; 43 DeviceSettingsService* g_device_settings_service_for_testing = NULL;
41 44
42 bool IsOwnerInTests(const std::string& user_id) { 45 bool IsOwnerInTests(const std::string& user_id) {
43 if (user_id.empty() || 46 if (user_id.empty() ||
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 DeviceSettingsService* OwnerSettingsService::GetDeviceSettingsService() { 523 DeviceSettingsService* OwnerSettingsService::GetDeviceSettingsService() {
521 DCHECK(thread_checker_.CalledOnValidThread()); 524 DCHECK(thread_checker_.CalledOnValidThread());
522 if (g_device_settings_service_for_testing) 525 if (g_device_settings_service_for_testing)
523 return g_device_settings_service_for_testing; 526 return g_device_settings_service_for_testing;
524 if (DeviceSettingsService::IsInitialized()) 527 if (DeviceSettingsService::IsInitialized())
525 return DeviceSettingsService::Get(); 528 return DeviceSettingsService::Get();
526 return NULL; 529 return NULL;
527 } 530 }
528 531
529 } // namespace chromeos 532 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698