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

Side by Side Diff: content/child/background_sync/background_sync_provider.cc

Issue 1197853005: Collecting statistics on iframe permissions use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed NOTREACHED calls. Created 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/child/background_sync/background_sync_provider.h" 5 #include "content/child/background_sync/background_sync_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/child/background_sync/background_sync_type_converters.h" 9 #include "content/child/background_sync/background_sync_type_converters.h"
10 #include "content/child/service_worker/web_service_worker_registration_impl.h" 10 #include "content/child/service_worker/web_service_worker_registration_impl.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 blink::WebSyncPermissionStatusGranted)); 267 blink::WebSyncPermissionStatusGranted));
268 break; 268 break;
269 case PERMISSION_STATUS_DENIED: 269 case PERMISSION_STATUS_DENIED:
270 callbacks->onSuccess(new blink::WebSyncPermissionStatus( 270 callbacks->onSuccess(new blink::WebSyncPermissionStatus(
271 blink::WebSyncPermissionStatusDenied)); 271 blink::WebSyncPermissionStatusDenied));
272 break; 272 break;
273 case PERMISSION_STATUS_ASK: 273 case PERMISSION_STATUS_ASK:
274 callbacks->onSuccess(new blink::WebSyncPermissionStatus( 274 callbacks->onSuccess(new blink::WebSyncPermissionStatus(
275 blink::WebSyncPermissionStatusPrompt)); 275 blink::WebSyncPermissionStatusPrompt));
276 break; 276 break;
277 case PERMISSION_STATUS_NUM:
278 // PERMISSION_STATUS_NUM should never be passed into this function.
jww 2015/07/07 21:14:23 See my comment about this comment in permission_di
keenanb 2015/07/08 00:37:21 Done.
279 NOTREACHED();
280 break;
277 } 281 }
278 break; 282 break;
279 case BACKGROUND_SYNC_ERROR_NOT_FOUND: 283 case BACKGROUND_SYNC_ERROR_NOT_FOUND:
280 // This error should never be returned from 284 // This error should never be returned from
281 // BackgroundSyncManager::GetPermissionStatus 285 // BackgroundSyncManager::GetPermissionStatus
282 NOTREACHED(); 286 NOTREACHED();
283 break; 287 break;
284 case BACKGROUND_SYNC_ERROR_STORAGE: 288 case BACKGROUND_SYNC_ERROR_STORAGE:
285 callbacks->onError( 289 callbacks->onError(
286 new blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown, 290 new blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown,
(...skipping 10 matching lines...) Expand all
297 BackgroundSyncServicePtr& 301 BackgroundSyncServicePtr&
298 BackgroundSyncProvider::GetBackgroundSyncServicePtr() { 302 BackgroundSyncProvider::GetBackgroundSyncServicePtr() {
299 if (!background_sync_service_.get()) { 303 if (!background_sync_service_.get()) {
300 service_registry_->ConnectToRemoteService( 304 service_registry_->ConnectToRemoteService(
301 mojo::GetProxy(&background_sync_service_)); 305 mojo::GetProxy(&background_sync_service_));
302 } 306 }
303 return background_sync_service_; 307 return background_sync_service_;
304 } 308 }
305 309
306 } // namespace content 310 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698