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

Side by Side Diff: content/browser/device_sensors/data_fetcher_shared_memory_win.cc

Issue 317163006: Fix switch statement in DataFetcherSharedMemory::SetBufferAvailableState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 // 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 "data_fetcher_shared_memory.h" 5 #include "data_fetcher_shared_memory.h"
6 6
7 #include <GuidDef.h> 7 #include <GuidDef.h>
8 #include <InitGuid.h> 8 #include <InitGuid.h>
9 #include <PortableDeviceTypes.h> 9 #include <PortableDeviceTypes.h>
10 #include <Sensors.h> 10 #include <Sensors.h>
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 void DataFetcherSharedMemory::SetBufferAvailableState( 378 void DataFetcherSharedMemory::SetBufferAvailableState(
379 ConsumerType consumer_type, bool enabled) { 379 ConsumerType consumer_type, bool enabled) {
380 switch(consumer_type) { 380 switch(consumer_type) {
381 case CONSUMER_TYPE_ORIENTATION: 381 case CONSUMER_TYPE_ORIENTATION:
382 if (orientation_buffer_) { 382 if (orientation_buffer_) {
383 orientation_buffer_->seqlock.WriteBegin(); 383 orientation_buffer_->seqlock.WriteBegin();
384 orientation_buffer_->data.allAvailableSensorsAreActive = enabled; 384 orientation_buffer_->data.allAvailableSensorsAreActive = enabled;
385 orientation_buffer_->seqlock.WriteEnd(); 385 orientation_buffer_->seqlock.WriteEnd();
386 } 386 }
387 break;
387 case CONSUMER_TYPE_MOTION: 388 case CONSUMER_TYPE_MOTION:
388 if (motion_buffer_) { 389 if (motion_buffer_) {
389 motion_buffer_->seqlock.WriteBegin(); 390 motion_buffer_->seqlock.WriteBegin();
390 motion_buffer_->data.allAvailableSensorsAreActive = enabled; 391 motion_buffer_->data.allAvailableSensorsAreActive = enabled;
391 motion_buffer_->seqlock.WriteEnd(); 392 motion_buffer_->seqlock.WriteEnd();
392 } 393 }
394 break;
393 default: 395 default:
394 NOTREACHED(); 396 NOTREACHED();
395 } 397 }
396 } 398 }
397 399
398 } // namespace content 400 } // namespace content
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