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

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

Issue 2271953002: Remove Platform::current checks from Mojo's error handlers in geolocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 queryNextPosition(); 519 queryNextPosition();
520 } 520 }
521 521
522 void Geolocation::pageVisibilityChanged() 522 void Geolocation::pageVisibilityChanged()
523 { 523 {
524 updateGeolocationServiceConnection(); 524 updateGeolocationServiceConnection();
525 } 525 }
526 526
527 void Geolocation::onGeolocationConnectionError() 527 void Geolocation::onGeolocationConnectionError()
528 { 528 {
529 // If a request is outstanding at process shutdown, this error handler will
530 // be called. In that case, blink has already shut down so do nothing.
531 //
532 // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
533 if (!Platform::current())
534 return;
535
536 PositionError* error = PositionError::create(PositionError::kPositionUnavail able, failedToStartServiceErrorMessage); 529 PositionError* error = PositionError::create(PositionError::kPositionUnavail able, failedToStartServiceErrorMessage);
537 error->setIsFatal(true); 530 error->setIsFatal(true);
538 handleError(error); 531 handleError(error);
539 } 532 }
540 533
541 void Geolocation::onPermissionConnectionError() 534 void Geolocation::onPermissionConnectionError()
542 { 535 {
543 // If a request is outstanding at process shutdown, this error handler will
544 // be called. In that case, blink has already shut down so do nothing.
545 //
546 // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
547 if (!Platform::current())
548 return;
549
550 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); 536 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
551 } 537 }
552 538
553 } // namespace blink 539 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698