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

Side by Side Diff: chrome/browser/printing/cloud_print/privet_notifications.cc

Issue 2963613002: Remove the (broken and unneeded) 'force_update' option from ServiceWatcher::DiscoverNewDevices. (Closed)
Patch Set: Fixup yet another mac site revealed by CQ Created 3 years, 5 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 #include "chrome/browser/printing/cloud_print/privet_notifications.h" 5 #include "chrome/browser/printing/cloud_print/privet_notifications.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 void PrivetNotificationService::StartLister() { 332 void PrivetNotificationService::StartLister() {
333 ReportPrivetUmaEvent(PRIVET_LISTER_STARTED); 333 ReportPrivetUmaEvent(PRIVET_LISTER_STARTED);
334 #if defined(ENABLE_MDNS) 334 #if defined(ENABLE_MDNS)
335 traffic_detector_ = nullptr; 335 traffic_detector_ = nullptr;
336 #endif // ENABLE_MDNS 336 #endif // ENABLE_MDNS
337 service_discovery_client_ = 337 service_discovery_client_ =
338 local_discovery::ServiceDiscoverySharedClient::GetInstance(); 338 local_discovery::ServiceDiscoverySharedClient::GetInstance();
339 device_lister_.reset( 339 device_lister_.reset(
340 new PrivetDeviceListerImpl(service_discovery_client_.get(), this)); 340 new PrivetDeviceListerImpl(service_discovery_client_.get(), this));
341 device_lister_->Start(); 341 device_lister_->Start();
342 device_lister_->DiscoverNewDevices(false); 342 device_lister_->DiscoverNewDevices();
343 343
344 std::unique_ptr<PrivetHTTPAsynchronousFactory> http_factory( 344 std::unique_ptr<PrivetHTTPAsynchronousFactory> http_factory(
345 PrivetHTTPAsynchronousFactory::CreateInstance( 345 PrivetHTTPAsynchronousFactory::CreateInstance(
346 content::BrowserContext::GetDefaultStoragePartition(profile_)-> 346 content::BrowserContext::GetDefaultStoragePartition(profile_)->
347 GetURLRequestContext())); 347 GetURLRequestContext()));
348 348
349 privet_notifications_listener_.reset( 349 privet_notifications_listener_.reset(
350 new PrivetNotificationsListener(std::move(http_factory), this)); 350 new PrivetNotificationsListener(std::move(http_factory), this));
351 } 351 }
352 352
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 profile_->GetPrefs()->SetBoolean(prefs::kLocalDiscoveryNotificationsEnabled, 388 profile_->GetPrefs()->SetBoolean(prefs::kLocalDiscoveryNotificationsEnabled,
389 false); 389 false);
390 } 390 }
391 391
392 void PrivetNotificationDelegate::CloseNotification() { 392 void PrivetNotificationDelegate::CloseNotification() {
393 g_browser_process->notification_ui_manager()->CancelById( 393 g_browser_process->notification_ui_manager()->CancelById(
394 id(), NotificationUIManager::GetProfileID(profile_)); 394 id(), NotificationUIManager::GetProfileID(profile_));
395 } 395 }
396 396
397 } // namespace cloud_print 397 } // namespace cloud_print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698