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

Side by Side Diff: chrome/browser/chromeos/net/wake_on_wifi_manager_unittest.cc

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … Created 4 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
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/net/wake_on_wifi_connection_observer.h" 5 #include "chrome/browser/chromeos/net/wake_on_wifi_connection_observer.h"
6 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h" 6 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h"
7 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 7 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
8 #include "chrome/test/base/testing_profile.h" 8 #include "chrome/test/base/testing_profile.h"
9 #include "chromeos/network/mock_network_device_handler.h" 9 #include "chromeos/network/mock_network_device_handler.h"
10 #include "content/public/test/test_browser_thread_bundle.h" 10 #include "content/public/test/test_browser_thread_bundle.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using testing::_; 14 using testing::_;
15 using testing::Return; 15 using testing::Return;
16 using testing::StrictMock; 16 using testing::StrictMock;
17 17
18 namespace chromeos { 18 namespace chromeos {
19 namespace { 19 namespace {
20 20
21 scoped_ptr<KeyedService> BuildFakeGCMProfileService( 21 std::unique_ptr<KeyedService> BuildFakeGCMProfileService(
22 content::BrowserContext* context) { 22 content::BrowserContext* context) {
23 return gcm::FakeGCMProfileService::Build(static_cast<Profile*>(context)); 23 return gcm::FakeGCMProfileService::Build(static_cast<Profile*>(context));
24 } 24 }
25 25
26 class WakeOnWifiObserverTest : public ::testing::Test { 26 class WakeOnWifiObserverTest : public ::testing::Test {
27 public: 27 public:
28 WakeOnWifiObserverTest() { 28 WakeOnWifiObserverTest() {
29 gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactory( 29 gcm::GCMProfileServiceFactory::GetInstance()->SetTestingFactory(
30 &profile_, &BuildFakeGCMProfileService); 30 &profile_, &BuildFakeGCMProfileService);
31 } 31 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 &mock_network_device_handler_); 86 &mock_network_device_handler_);
87 87
88 EXPECT_CALL(mock_network_device_handler_, 88 EXPECT_CALL(mock_network_device_handler_,
89 RemoveWifiWakeOnPacketConnection(_, _, _)) 89 RemoveWifiWakeOnPacketConnection(_, _, _))
90 .Times(0); 90 .Times(0);
91 91
92 observer.RemoveWakeOnPacketConnection(); 92 observer.RemoveWakeOnPacketConnection();
93 } 93 }
94 94
95 } // namespace chromeos 95 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698