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

Side by Side Diff: chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm

Issue 591493002: Remove implicit conversions from scoped_refptr to T* in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/common/local_discovery/service_discovery_client.h" 10 #include "chrome/common/local_discovery/service_discovery_client.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 @end 39 @end
40 40
41 namespace local_discovery { 41 namespace local_discovery {
42 42
43 class ServiceDiscoveryClientMacTest : public CocoaTest { 43 class ServiceDiscoveryClientMacTest : public CocoaTest {
44 public: 44 public:
45 ServiceDiscoveryClientMacTest() : num_updates_(0), num_resolves_(0) { 45 ServiceDiscoveryClientMacTest() : num_updates_(0), num_resolves_(0) {
46 client_mac_ = new ServiceDiscoveryClientMac(); 46 client_mac_ = new ServiceDiscoveryClientMac();
47 client_ = client_mac_; 47 client_ = client_mac_.get();
48 } 48 }
49 49
50 void OnServiceUpdated( 50 void OnServiceUpdated(
51 ServiceWatcher::UpdateType update, 51 ServiceWatcher::UpdateType update,
52 const std::string& service_name) { 52 const std::string& service_name) {
53 last_update_ = update; 53 last_update_ = update;
54 last_service_name_ = service_name; 54 last_service_name_ = service_name;
55 num_updates_++; 55 num_updates_++;
56 } 56 }
57 57
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 resolver_impl->GetContainerForTesting()->OnResolveUpdate( 122 resolver_impl->GetContainerForTesting()->OnResolveUpdate(
123 ServiceResolver::STATUS_SUCCESS); 123 ServiceResolver::STATUS_SUCCESS);
124 124
125 base::MessageLoop::current()->RunUntilIdle(); 125 base::MessageLoop::current()->RunUntilIdle();
126 126
127 EXPECT_EQ(1, num_resolves_); 127 EXPECT_EQ(1, num_resolves_);
128 EXPECT_EQ(2u, last_service_description_.metadata.size()); 128 EXPECT_EQ(2u, last_service_description_.metadata.size());
129 } 129 }
130 130
131 } // namespace local_discovery 131 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_platform_part_mac.mm ('k') | chrome/browser/media_galleries/fileapi/picasa_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698