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

Side by Side Diff: chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc

Issue 1556783002: Convert Pass()→std::move() for CrOS extension code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 28 matching lines...) Expand all
39 new api::settings_private::PrefObject()); 39 new api::settings_private::PrefObject());
40 pref_object->key = name; 40 pref_object->key = name;
41 pref_object->type = api::settings_private::PrefType::PREF_TYPE_LIST; 41 pref_object->type = api::settings_private::PrefType::PREF_TYPE_LIST;
42 42
43 base::ListValue* value = new base::ListValue(); 43 base::ListValue* value = new base::ListValue();
44 for (auto& email : whitelisted_users_) { 44 for (auto& email : whitelisted_users_) {
45 value->AppendString(email); 45 value->AppendString(email);
46 } 46 }
47 pref_object->value.reset(value); 47 pref_object->value.reset(value);
48 48
49 return pref_object.Pass(); 49 return pref_object;
50 } 50 }
51 51
52 bool AppendToListCrosSetting(const std::string& pref_name, 52 bool AppendToListCrosSetting(const std::string& pref_name,
53 const base::Value& value) override { 53 const base::Value& value) override {
54 std::string email; 54 std::string email;
55 value.GetAsString(&email); 55 value.GetAsString(&email);
56 56
57 for (auto& user : whitelisted_users_) { 57 for (auto& user : whitelisted_users_) {
58 if (email == user) 58 if (email == user)
59 return false; 59 return false;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 IN_PROC_BROWSER_TEST_F(UsersPrivateApiTest, AddAndRemoveUsers) { 158 IN_PROC_BROWSER_TEST_F(UsersPrivateApiTest, AddAndRemoveUsers) {
159 EXPECT_TRUE(RunSubtest("addAndRemoveUsers")) << message_; 159 EXPECT_TRUE(RunSubtest("addAndRemoveUsers")) << message_;
160 } 160 }
161 161
162 IN_PROC_BROWSER_TEST_F(UsersPrivateApiTest, IsOwner) { 162 IN_PROC_BROWSER_TEST_F(UsersPrivateApiTest, IsOwner) {
163 EXPECT_TRUE(RunSubtest("isOwner")) << message_; 163 EXPECT_TRUE(RunSubtest("isOwner")) << message_;
164 } 164 }
165 #endif 165 #endif
166 166
167 } // namespace extensions 167 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/media_player_event_router.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698