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

Side by Side Diff: extensions/browser/test_management_policy.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « extensions/browser/management_policy_unittest.cc ('k') | extensions/common/error_utils.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 "extensions/browser/test_management_policy.h" 5 #include "extensions/browser/test_management_policy.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 10
11 TestManagementPolicyProvider::TestManagementPolicyProvider() 11 TestManagementPolicyProvider::TestManagementPolicyProvider()
12 : may_load_(true), 12 : may_load_(true),
13 may_modify_status_(true), 13 may_modify_status_(true),
14 must_remain_enabled_(false), 14 must_remain_enabled_(false),
15 must_remain_disabled_(false), 15 must_remain_disabled_(false),
16 disable_reason_(Extension::DISABLE_NONE) { 16 disable_reason_(Extension::DISABLE_NONE) {
17 error_message_ = UTF8ToUTF16(expected_error()); 17 error_message_ = base::UTF8ToUTF16(expected_error());
18 } 18 }
19 19
20 TestManagementPolicyProvider::TestManagementPolicyProvider( 20 TestManagementPolicyProvider::TestManagementPolicyProvider(
21 int prohibited_actions) { 21 int prohibited_actions) {
22 SetProhibitedActions(prohibited_actions); 22 SetProhibitedActions(prohibited_actions);
23 error_message_ = UTF8ToUTF16(expected_error()); 23 error_message_ = base::UTF8ToUTF16(expected_error());
24 } 24 }
25 25
26 void TestManagementPolicyProvider::SetProhibitedActions( 26 void TestManagementPolicyProvider::SetProhibitedActions(
27 int prohibited_actions) { 27 int prohibited_actions) {
28 may_load_ = (prohibited_actions & PROHIBIT_LOAD) == 0; 28 may_load_ = (prohibited_actions & PROHIBIT_LOAD) == 0;
29 may_modify_status_ = (prohibited_actions & PROHIBIT_MODIFY_STATUS) == 0; 29 may_modify_status_ = (prohibited_actions & PROHIBIT_MODIFY_STATUS) == 0;
30 must_remain_enabled_ = (prohibited_actions & MUST_REMAIN_ENABLED) != 0; 30 must_remain_enabled_ = (prohibited_actions & MUST_REMAIN_ENABLED) != 0;
31 must_remain_disabled_ = (prohibited_actions & MUST_REMAIN_DISABLED) != 0; 31 must_remain_disabled_ = (prohibited_actions & MUST_REMAIN_DISABLED) != 0;
32 } 32 }
33 33
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (error) 70 if (error)
71 *error = error_message_; 71 *error = error_message_;
72 if (reason) 72 if (reason)
73 *reason = disable_reason_; 73 *reason = disable_reason_;
74 } 74 }
75 return must_remain_disabled_; 75 return must_remain_disabled_;
76 } 76 }
77 77
78 78
79 } // namespace extensions 79 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/management_policy_unittest.cc ('k') | extensions/common/error_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698