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

Side by Side Diff: chrome/browser/policy/cloud/cloud_policy_browsertest.cc

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 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 unified diff | Download patch
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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 namespace content { 70 namespace content {
71 class BrowserContext; 71 class BrowserContext;
72 } 72 }
73 73
74 namespace em = enterprise_management; 74 namespace em = enterprise_management;
75 75
76 namespace policy { 76 namespace policy {
77 77
78 namespace { 78 namespace {
79 79
80 KeyedService* BuildFakeProfileInvalidationProvider( 80 scoped_ptr<KeyedService> BuildFakeProfileInvalidationProvider(
81 content::BrowserContext* context) { 81 content::BrowserContext* context) {
82 return new invalidation::ProfileInvalidationProvider( 82 return make_scoped_ptr(new invalidation::ProfileInvalidationProvider(
83 scoped_ptr<invalidation::InvalidationService>( 83 scoped_ptr<invalidation::InvalidationService>(
84 new invalidation::FakeInvalidationService)); 84 new invalidation::FakeInvalidationService)));
85 } 85 }
86 86
87 #if !defined(OS_CHROMEOS) 87 #if !defined(OS_CHROMEOS)
88 const char* GetTestGaiaId() { 88 const char* GetTestGaiaId() {
89 return "gaia-id-user@example.com"; 89 return "gaia-id-user@example.com";
90 } 90 }
91 #endif 91 #endif
92 92
93 const char* GetTestUser() { 93 const char* GetTestUser() {
94 #if defined(OS_CHROMEOS) 94 #if defined(OS_CHROMEOS)
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 500
501 // They should now serialize to the same bytes. 501 // They should now serialize to the same bytes.
502 std::string chrome_settings_serialized; 502 std::string chrome_settings_serialized;
503 std::string cloud_policy_serialized; 503 std::string cloud_policy_serialized;
504 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized)); 504 ASSERT_TRUE(chrome_settings.SerializeToString(&chrome_settings_serialized));
505 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized)); 505 ASSERT_TRUE(cloud_policy.SerializeToString(&cloud_policy_serialized));
506 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized); 506 EXPECT_EQ(chrome_settings_serialized, cloud_policy_serialized);
507 } 507 }
508 508
509 } // namespace policy 509 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698