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

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

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/policy_service_impl_unittest.cc
diff --git a/chrome/browser/policy/policy_service_impl_unittest.cc b/chrome/browser/policy/policy_service_impl_unittest.cc
index 68026cac2553fa0101cebc1222c173d5ed87abc5..f5efb78499d43328c951da7627c1d4d80629eafb 100644
--- a/chrome/browser/policy/policy_service_impl_unittest.cc
+++ b/chrome/browser/policy/policy_service_impl_unittest.cc
@@ -630,10 +630,10 @@ TEST_F(PolicyServiceTest, IsInitializationComplete) {
}
TEST_F(PolicyServiceTest, RegisterPolicyDomain) {
- EXPECT_FALSE(
- policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_CHROME));
- EXPECT_FALSE(
- policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_EXTENSIONS));
+ EXPECT_FALSE(policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_CHROME)
+ .get());
+ EXPECT_FALSE(policy_service_->GetPolicyDomainDescriptor(
+ POLICY_DOMAIN_EXTENSIONS).get());
EXPECT_CALL(provider1_, RegisterPolicyDomain(_)).Times(AnyNumber());
EXPECT_CALL(provider2_, RegisterPolicyDomain(_)).Times(AnyNumber());
@@ -644,9 +644,10 @@ TEST_F(PolicyServiceTest, RegisterPolicyDomain) {
policy_service_->RegisterPolicyDomain(chrome_descriptor);
Mock::VerifyAndClearExpectations(&provider0_);
- EXPECT_TRUE(policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_CHROME));
- EXPECT_FALSE(
- policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_EXTENSIONS));
+ EXPECT_TRUE(policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_CHROME)
+ .get());
+ EXPECT_FALSE(policy_service_->GetPolicyDomainDescriptor(
+ POLICY_DOMAIN_EXTENSIONS).get());
// Register another namespace.
std::string error;
@@ -672,9 +673,10 @@ TEST_F(PolicyServiceTest, RegisterPolicyDomain) {
policy_service_->RegisterPolicyDomain(extensions_descriptor);
Mock::VerifyAndClearExpectations(&provider0_);
- EXPECT_TRUE(policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_CHROME));
- EXPECT_TRUE(
- policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_EXTENSIONS));
+ EXPECT_TRUE(policy_service_->GetPolicyDomainDescriptor(POLICY_DOMAIN_CHROME)
+ .get());
+ EXPECT_TRUE(policy_service_->GetPolicyDomainDescriptor(
+ POLICY_DOMAIN_EXTENSIONS).get());
// Remove those components.
scoped_refptr<PolicyDomainDescriptor> empty_extensions_descriptor =

Powered by Google App Engine
This is Rietveld 408576698