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

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

Issue 14179007: Move cryptohome_library to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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
Index: chrome/browser/policy/browser_policy_connector.cc
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index 639fb527251e8244223cfc2ea9cc9c2c0eef705f..4bc9cb4ff369ecdaed2248e34796615756a3f0ca 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -70,6 +70,7 @@
#include "chrome/browser/policy/cloud/resource_cache.h"
#include "chromeos/chromeos_paths.h"
#include "chromeos/chromeos_switches.h"
+#include "chromeos/cryptohome/cryptohome_library.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#else
@@ -128,12 +129,11 @@ BrowserPolicyConnector::BrowserPolicyConnector()
new DeviceManagementService(GetDeviceManagementUrl()));
#if defined(OS_CHROMEOS)
- chromeos::CrosLibrary* cros_library = chromeos::CrosLibrary::Get();
- // |cros_library| may be NULL on unit tests. DBusThreadManager may not be
- // initialized on unit tests..
- if (cros_library && chromeos::DBusThreadManager::IsInitialized()) {
+ // CryptohomeLibrary or DBusThreadManager may be uninitialized on unit tests.
+ if (chromeos::CryptohomeLibrary::IsInitialized() &&
+ chromeos::DBusThreadManager::IsInitialized()) {
chromeos::CryptohomeLibrary* cryptohome =
- cros_library->GetCryptohomeLibrary();
+ chromeos::CryptohomeLibrary::Get();
chromeos::CryptohomeClient* cryptohome_client =
chromeos::DBusThreadManager::Get()->GetCryptohomeClient();
install_attributes_.reset(

Powered by Google App Engine
This is Rietveld 408576698