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

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 to use permission status. 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 break;
jww 2015/07/07 18:41:46 Shouldn't this be a NOTREACHED?
keenanb 2015/07/07 21:02:59 Done.
277 } 279 }
278 break; 280 break;
279 case BACKGROUND_SYNC_ERROR_NOT_FOUND: 281 case BACKGROUND_SYNC_ERROR_NOT_FOUND:
280 // This error should never be returned from 282 // This error should never be returned from
281 // BackgroundSyncManager::GetPermissionStatus 283 // BackgroundSyncManager::GetPermissionStatus
282 NOTREACHED(); 284 NOTREACHED();
283 break; 285 break;
284 case BACKGROUND_SYNC_ERROR_STORAGE: 286 case BACKGROUND_SYNC_ERROR_STORAGE:
285 callbacks->onError( 287 callbacks->onError(
286 new blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown, 288 new blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown,
(...skipping 10 matching lines...) Expand all
297 BackgroundSyncServicePtr& 299 BackgroundSyncServicePtr&
298 BackgroundSyncProvider::GetBackgroundSyncServicePtr() { 300 BackgroundSyncProvider::GetBackgroundSyncServicePtr() {
299 if (!background_sync_service_.get()) { 301 if (!background_sync_service_.get()) {
300 service_registry_->ConnectToRemoteService( 302 service_registry_->ConnectToRemoteService(
301 mojo::GetProxy(&background_sync_service_)); 303 mojo::GetProxy(&background_sync_service_));
302 } 304 }
303 return background_sync_service_; 305 return background_sync_service_;
304 } 306 }
305 307
306 } // namespace content 308 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698