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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/event_router.cc

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: address comments Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.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/chromeos/extensions/file_manager/event_router.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 std::set<std::string> GetFileTransfersUpdateEventListenerExtensionIds() 335 std::set<std::string> GetFileTransfersUpdateEventListenerExtensionIds()
336 override { 336 override {
337 const extensions::EventListenerMap::ListenerList& listeners = 337 const extensions::EventListenerMap::ListenerList& listeners =
338 extensions::EventRouter::Get(profile_) 338 extensions::EventRouter::Get(profile_)
339 ->listeners() 339 ->listeners()
340 .GetEventListenersByName( 340 .GetEventListenersByName(
341 file_manager_private::OnFileTransfersUpdated::kEventName); 341 file_manager_private::OnFileTransfersUpdated::kEventName);
342 342
343 std::set<std::string> extension_ids; 343 std::set<std::string> extension_ids;
344 344
345 for (const auto listener : listeners) { 345 for (const auto& listener : listeners) {
346 extension_ids.insert(listener->extension_id()); 346 extension_ids.insert(listener->extension_id());
347 } 347 }
348 348
349 return extension_ids; 349 return extension_ids;
350 } 350 }
351 351
352 GURL ConvertDrivePathToFileSystemUrl( 352 GURL ConvertDrivePathToFileSystemUrl(
353 const base::FilePath& file_path, 353 const base::FilePath& file_path,
354 const std::string& extension_id) override { 354 const std::string& extension_id) override {
355 return file_manager::util::ConvertDrivePathToFileSystemUrl( 355 return file_manager::util::ConvertDrivePathToFileSystemUrl(
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting( 977 void EventRouter::SetDispatchDirectoryChangeEventImplForTesting(
978 const DispatchDirectoryChangeEventImplCallback& callback) { 978 const DispatchDirectoryChangeEventImplCallback& callback) {
979 dispatch_directory_change_event_impl_ = callback; 979 dispatch_directory_change_event_impl_ = callback;
980 } 980 }
981 981
982 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() { 982 base::WeakPtr<EventRouter> EventRouter::GetWeakPtr() {
983 return weak_factory_.GetWeakPtr(); 983 return weak_factory_.GetWeakPtr();
984 } 984 }
985 985
986 } // namespace file_manager 986 } // namespace file_manager
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698