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

Side by Side Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
4 * Copyright 2010, The Android Open Source Project 4 * Copyright 2010, The Android Open Source Project
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 cancelRequests(copy); 356 cancelRequests(copy);
357 } 357 }
358 358
359 void Geolocation::extractNotifiersWithCachedPosition( 359 void Geolocation::extractNotifiersWithCachedPosition(
360 GeoNotifierVector& notifiers, 360 GeoNotifierVector& notifiers,
361 GeoNotifierVector* cached) { 361 GeoNotifierVector* cached) {
362 GeoNotifierVector nonCached; 362 GeoNotifierVector nonCached;
363 for (GeoNotifier* notifier : notifiers) { 363 for (GeoNotifier* notifier : notifiers) {
364 if (notifier->useCachedPosition()) { 364 if (notifier->useCachedPosition()) {
365 if (cached) 365 if (cached)
366 cached->append(notifier); 366 cached->push_back(notifier);
367 } else 367 } else
368 nonCached.append(notifier); 368 nonCached.push_back(notifier);
369 } 369 }
370 notifiers.swap(nonCached); 370 notifiers.swap(nonCached);
371 } 371 }
372 372
373 void Geolocation::copyToSet(const GeoNotifierVector& src, 373 void Geolocation::copyToSet(const GeoNotifierVector& src,
374 GeoNotifierSet& dest) { 374 GeoNotifierSet& dest) {
375 for (GeoNotifier* notifier : src) 375 for (GeoNotifier* notifier : src)
376 dest.add(notifier); 376 dest.add(notifier);
377 } 377 }
378 378
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // be called. In that case, blink has already shut down so do nothing. 546 // be called. In that case, blink has already shut down so do nothing.
547 // 547 //
548 // TODO(sammc): Remove this once renderer shutdown is no longer graceful. 548 // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
549 if (!Platform::current()) 549 if (!Platform::current())
550 return; 550 return;
551 551
552 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); 552 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
553 } 553 }
554 554
555 } // namespace blink 555 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698