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

Side by Side Diff: chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « chrome/browser/prefs/active_profile_pref_service.cc ('k') | chrome/browser/ui/ash/ash_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/prefs/profile_pref_store_manager.h" 5 #include "chrome/browser/prefs/profile_pref_store_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 void OnResetOnLoad() override { 402 void OnResetOnLoad() override {
403 // As-is |reset_recorded_| is only designed to remember a single reset, make 403 // As-is |reset_recorded_| is only designed to remember a single reset, make
404 // sure none was previously recorded (or that ClearResetRecorded() was 404 // sure none was previously recorded (or that ClearResetRecorded() was
405 // called). 405 // called).
406 EXPECT_FALSE(reset_recorded_); 406 EXPECT_FALSE(reset_recorded_);
407 reset_recorded_ = true; 407 reset_recorded_ = true;
408 } 408 }
409 409
410 void BindInterface(const std::string& interface_name, 410 void BindInterface(const std::string& interface_name,
411 mojo::ScopedMessagePipeHandle handle) { 411 mojo::ScopedMessagePipeHandle handle) {
412 service_manager::ServiceInfo source( 412 service_manager::BindSourceInfo source(
413 service_manager::Identity(content::mojom::kBrowserServiceName, 413 service_manager::Identity(content::mojom::kBrowserServiceName,
414 service_manager::mojom::kRootUserID), 414 service_manager::mojom::kRootUserID),
415 service_manager::InterfaceProviderSpecMap()); 415 service_manager::CapabilitySet());
416 static_cast<service_manager::mojom::Service*>(pref_service_context_.get()) 416 static_cast<service_manager::mojom::Service*>(pref_service_context_.get())
417 ->OnBindInterface(source, interface_name, std::move(handle), 417 ->OnBindInterface(source, interface_name, std::move(handle),
418 base::Bind(&base::DoNothing)); 418 base::Bind(&base::DoNothing));
419 } 419 }
420 420
421 base::test::ScopedFeatureList feature_list_; 421 base::test::ScopedFeatureList feature_list_;
422 bool reset_recorded_; 422 bool reset_recorded_;
423 std::unique_ptr<base::SequencedWorkerPoolOwner> worker_pool_; 423 std::unique_ptr<base::SequencedWorkerPoolOwner> worker_pool_;
424 std::unique_ptr<service_manager::ServiceContext> pref_service_context_; 424 std::unique_ptr<service_manager::ServiceContext> pref_service_context_;
425 std::unique_ptr<service_manager::Connector> connector_; 425 std::unique_ptr<service_manager::Connector> connector_;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 LoadExistingPrefs(); 628 LoadExistingPrefs();
629 ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld); 629 ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld);
630 VerifyResetRecorded(false); 630 VerifyResetRecorded(false);
631 } 631 }
632 632
633 // The parameter controls whether the user pref store is created within a 633 // The parameter controls whether the user pref store is created within a
634 // service. 634 // service.
635 INSTANTIATE_TEST_CASE_P(ProfilePrefStoreManagerTest, 635 INSTANTIATE_TEST_CASE_P(ProfilePrefStoreManagerTest,
636 ProfilePrefStoreManagerTest, 636 ProfilePrefStoreManagerTest,
637 testing::Bool()); 637 testing::Bool());
OLDNEW
« no previous file with comments | « chrome/browser/prefs/active_profile_pref_service.cc ('k') | chrome/browser/ui/ash/ash_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698