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

Side by Side Diff: extensions/common/permissions/manifest_permission_set_unittest.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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 | « extensions/common/event_filtering_info.cc ('k') | extensions/renderer/script_injection.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/pickle.h" 5 #include "base/pickle.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "extensions/common/permissions/manifest_permission.h" 7 #include "extensions/common/permissions/manifest_permission.h"
8 #include "extensions/common/permissions/manifest_permission_set.h" 8 #include "extensions/common/permissions/manifest_permission_set.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 14 matching lines...) Expand all
25 25
26 bool HasMessages() const override { return false; } 26 bool HasMessages() const override { return false; }
27 27
28 PermissionMessages GetMessages() const override { 28 PermissionMessages GetMessages() const override {
29 return PermissionMessages(); 29 return PermissionMessages();
30 } 30 }
31 31
32 bool FromValue(const base::Value* value) override { return true; } 32 bool FromValue(const base::Value* value) override { return true; }
33 33
34 scoped_ptr<base::Value> ToValue() const override { 34 scoped_ptr<base::Value> ToValue() const override {
35 return make_scoped_ptr(base::Value::CreateNullValue()); 35 return base::Value::CreateNullValue();
36 } 36 }
37 37
38 ManifestPermission* Diff(const ManifestPermission* rhs) const override { 38 ManifestPermission* Diff(const ManifestPermission* rhs) const override {
39 const MockManifestPermission* other = 39 const MockManifestPermission* other =
40 static_cast<const MockManifestPermission*>(rhs); 40 static_cast<const MockManifestPermission*>(rhs);
41 EXPECT_EQ(name_, other->name_); 41 EXPECT_EQ(name_, other->name_);
42 return NULL; 42 return NULL;
43 } 43 }
44 44
45 ManifestPermission* Union(const ManifestPermission* rhs) const override { 45 ManifestPermission* Union(const ManifestPermission* rhs) const override {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 EXPECT_EQ(expected_permissions, result); 219 EXPECT_EQ(expected_permissions, result);
220 220
221 // |result| = |permissions1| - |permissions2| --> 221 // |result| = |permissions1| - |permissions2| -->
222 // |result| intersect |permissions2| == empty_set 222 // |result| intersect |permissions2| == empty_set
223 ManifestPermissionSet result2; 223 ManifestPermissionSet result2;
224 ManifestPermissionSet::Intersection(result, permissions2, &result2); 224 ManifestPermissionSet::Intersection(result, permissions2, &result2);
225 EXPECT_TRUE(result2.empty()); 225 EXPECT_TRUE(result2.empty());
226 } 226 }
227 227
228 } // namespace extensions 228 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/event_filtering_info.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698