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

Side by Side Diff: chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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 "chrome/browser/chromeos/extensions/device_local_account_management_pol icy_provider.h" 5 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol icy_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #if defined(NDEBUG) 84 #if defined(NDEBUG)
85 NOTREACHED(); 85 NOTREACHED();
86 return std::string(); 86 return std::string();
87 #else 87 #else
88 return "whitelist for device-local accounts"; 88 return "whitelist for device-local accounts";
89 #endif 89 #endif
90 } 90 }
91 91
92 bool DeviceLocalAccountManagementPolicyProvider::UserMayLoad( 92 bool DeviceLocalAccountManagementPolicyProvider::UserMayLoad(
93 const extensions::Extension* extension, 93 const extensions::Extension* extension,
94 string16* error) const { 94 base::string16* error) const {
95 if (account_type_ == policy::DeviceLocalAccount::TYPE_KIOSK_APP) { 95 if (account_type_ == policy::DeviceLocalAccount::TYPE_KIOSK_APP) {
96 // For single-app kiosk sessions, allow only platform apps. 96 // For single-app kiosk sessions, allow only platform apps.
97 if (extension->GetType() == extensions::Manifest::TYPE_PLATFORM_APP) 97 if (extension->GetType() == extensions::Manifest::TYPE_PLATFORM_APP)
98 return true; 98 return true;
99 99
100 } else { 100 } else {
101 // Allow extension if its type is whitelisted for use in device-local 101 // Allow extension if its type is whitelisted for use in device-local
102 // accounts. 102 // accounts.
103 if (extension->GetType() == extensions::Manifest::TYPE_HOSTED_APP) 103 if (extension->GetType() == extensions::Manifest::TYPE_HOSTED_APP)
104 return true; 104 return true;
(...skipping 10 matching lines...) Expand all
115 if (error) { 115 if (error) {
116 *error = l10n_util::GetStringFUTF16( 116 *error = l10n_util::GetStringFUTF16(
117 IDS_EXTENSION_CANT_INSTALL_IN_DEVICE_LOCAL_ACCOUNT, 117 IDS_EXTENSION_CANT_INSTALL_IN_DEVICE_LOCAL_ACCOUNT,
118 UTF8ToUTF16(extension->name()), 118 UTF8ToUTF16(extension->name()),
119 UTF8ToUTF16(extension->id())); 119 UTF8ToUTF16(extension->id()));
120 } 120 }
121 return false; 121 return false;
122 } 122 }
123 123
124 } // namespace chromeos 124 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698