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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 (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 "chrome/browser/chromeos/extensions/info_private_api.h" 5 #include "chrome/browser/chromeos/extensions/info_private_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 if (property_name == kPropertyInitialLocale) { 242 if (property_name == kPropertyInitialLocale) {
243 return new base::StringValue( 243 return new base::StringValue(
244 chromeos::StartupUtils::GetInitialLocale()); 244 chromeos::StartupUtils::GetInitialLocale());
245 } 245 }
246 246
247 if (property_name == kPropertyBoard) { 247 if (property_name == kPropertyBoard) {
248 return new base::StringValue(base::SysInfo::GetLsbReleaseBoard()); 248 return new base::StringValue(base::SysInfo::GetLsbReleaseBoard());
249 } 249 }
250 250
251 if (property_name == kPropertyOwner) { 251 if (property_name == kPropertyOwner) {
252 return new base::FundamentalValue( 252 return new base::Value(
253 user_manager::UserManager::Get()->IsCurrentUserOwner()); 253 user_manager::UserManager::Get()->IsCurrentUserOwner());
254 } 254 }
255 255
256 if (property_name == kPropertySessionType) { 256 if (property_name == kPropertySessionType) {
257 if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()) 257 if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode())
258 return new base::StringValue(kSessionTypeKiosk); 258 return new base::StringValue(kSessionTypeKiosk);
259 if (ExtensionsBrowserClient::Get()->IsLoggedInAsPublicAccount()) 259 if (ExtensionsBrowserClient::Get()->IsLoggedInAsPublicAccount())
260 return new base::StringValue(kSessionTypePublicSession); 260 return new base::StringValue(kSessionTypePublicSession);
261 return new base::StringValue(kSessionTypeNormal); 261 return new base::StringValue(kSessionTypeNormal);
262 } 262 }
(...skipping 20 matching lines...) Expand all
283 } 283 }
284 284
285 if (property_name == kPropertySupportedTimezones) { 285 if (property_name == kPropertySupportedTimezones) {
286 std::unique_ptr<base::ListValue> values = 286 std::unique_ptr<base::ListValue> values =
287 chromeos::system::GetTimezoneList(); 287 chromeos::system::GetTimezoneList();
288 return values.release(); 288 return values.release();
289 } 289 }
290 290
291 const char* pref_name = GetBoolPrefNameForApiProperty(property_name.c_str()); 291 const char* pref_name = GetBoolPrefNameForApiProperty(property_name.c_str());
292 if (pref_name) { 292 if (pref_name) {
293 return new base::FundamentalValue( 293 return new base::Value(
294 Profile::FromBrowserContext(context_)->GetPrefs()->GetBoolean( 294 Profile::FromBrowserContext(context_)->GetPrefs()->GetBoolean(
295 pref_name)); 295 pref_name));
296 } 296 }
297 297
298 DLOG(ERROR) << "Unknown property request: " << property_name; 298 DLOG(ERROR) << "Unknown property request: " << property_name;
299 return NULL; 299 return NULL;
300 } 300 }
301 301
302 ChromeosInfoPrivateSetFunction::ChromeosInfoPrivateSetFunction() { 302 ChromeosInfoPrivateSetFunction::ChromeosInfoPrivateSetFunction() {
303 } 303 }
(...skipping 19 matching lines...) Expand all
323 param_value); 323 param_value);
324 } else { 324 } else {
325 return RespondNow(Error(kPropertyNotFound, param_name)); 325 return RespondNow(Error(kPropertyNotFound, param_name));
326 } 326 }
327 } 327 }
328 328
329 return RespondNow(NoArguments()); 329 return RespondNow(NoArguments());
330 } 330 }
331 331
332 } // namespace extensions 332 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698