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

Side by Side Diff: ppapi/shared_impl/ppapi_permissions.cc

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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 | « ppapi/shared_impl/ppapi_permissions.h ('k') | ppapi/shared_impl/ppapi_preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/shared_impl/ppapi_permissions.h" 5 #include "ppapi/shared_impl/ppapi_permissions.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ppapi/shared_impl/ppapi_switches.h" 9 #include "ppapi/shared_impl/ppapi_switches.h"
10 10
11 namespace ppapi { 11 namespace ppapi {
12 12
13 PpapiPermissions::PpapiPermissions() : permissions_(0) { 13 PpapiPermissions::PpapiPermissions() : permissions_(0) {}
14 }
15 14
16 PpapiPermissions::PpapiPermissions(uint32 perms) : permissions_(perms) { 15 PpapiPermissions::PpapiPermissions(uint32 perms) : permissions_(perms) {}
17 }
18 16
19 PpapiPermissions::~PpapiPermissions() { 17 PpapiPermissions::~PpapiPermissions() {}
20 }
21 18
22 // static 19 // static
23 PpapiPermissions PpapiPermissions::AllPermissions() { 20 PpapiPermissions PpapiPermissions::AllPermissions() {
24 return PpapiPermissions(PERMISSION_ALL_BITS); 21 return PpapiPermissions(PERMISSION_ALL_BITS);
25 } 22 }
26 23
27 // static 24 // static
28 PpapiPermissions PpapiPermissions::GetForCommandLine(uint32 base_perms) { 25 PpapiPermissions PpapiPermissions::GetForCommandLine(uint32 base_perms) {
29 uint32 additional_permissions = 0; 26 uint32 additional_permissions = 0;
30 27
(...skipping 14 matching lines...) Expand all
45 // represented in the future so don't want callers making assumptions about 42 // represented in the future so don't want callers making assumptions about
46 // bits. 43 // bits.
47 uint32 perm_int = static_cast<uint32>(perm); 44 uint32 perm_int = static_cast<uint32>(perm);
48 if (!perm_int) 45 if (!perm_int)
49 return true; // You always have "no permission". 46 return true; // You always have "no permission".
50 DCHECK((perm_int & (perm_int - 1)) == 0); 47 DCHECK((perm_int & (perm_int - 1)) == 0);
51 return !!(permissions_ & perm_int); 48 return !!(permissions_ & perm_int);
52 } 49 }
53 50
54 } // namespace ppapi 51 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppapi_permissions.h ('k') | ppapi/shared_impl/ppapi_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698