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

Side by Side Diff: chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 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 (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/extensions/api/media_galleries_private/media_galleries_ private_api.h" 5 #include "chrome/browser/extensions/api/media_galleries_private/media_galleries_ private_api.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 using extensions::api::media_galleries_private::EjectDeviceResultCode; 407 using extensions::api::media_galleries_private::EjectDeviceResultCode;
408 408
409 EjectDeviceResultCode result = EJECT_DEVICE_RESULT_CODE_FAILURE; 409 EjectDeviceResultCode result = EJECT_DEVICE_RESULT_CODE_FAILURE;
410 if (status == chrome::StorageMonitor::EJECT_OK) 410 if (status == chrome::StorageMonitor::EJECT_OK)
411 result = EJECT_DEVICE_RESULT_CODE_SUCCESS; 411 result = EJECT_DEVICE_RESULT_CODE_SUCCESS;
412 if (status == chrome::StorageMonitor::EJECT_IN_USE) 412 if (status == chrome::StorageMonitor::EJECT_IN_USE)
413 result = EJECT_DEVICE_RESULT_CODE_IN_USE; 413 result = EJECT_DEVICE_RESULT_CODE_IN_USE;
414 if (status == chrome::StorageMonitor::EJECT_NO_SUCH_DEVICE) 414 if (status == chrome::StorageMonitor::EJECT_NO_SUCH_DEVICE)
415 result = EJECT_DEVICE_RESULT_CODE_NO_SUCH_DEVICE; 415 result = EJECT_DEVICE_RESULT_CODE_NO_SUCH_DEVICE;
416 416
417 SetResult(base::StringValue::CreateStringValue( 417 SetResult(new base::StringValue(
418 api::media_galleries_private::ToString(result))); 418 api::media_galleries_private::ToString(result)));
419 SendResponse(true); 419 SendResponse(true);
420 } 420 }
421 421
422 /////////////////////////////////////////////////////////////////////////////// 422 ///////////////////////////////////////////////////////////////////////////////
423 // MediaGalleriesPrivateGetHandlersFunction // 423 // MediaGalleriesPrivateGetHandlersFunction //
424 /////////////////////////////////////////////////////////////////////////////// 424 ///////////////////////////////////////////////////////////////////////////////
425 425
426 MediaGalleriesPrivateGetHandlersFunction:: 426 MediaGalleriesPrivateGetHandlersFunction::
427 ~MediaGalleriesPrivateGetHandlersFunction() { 427 ~MediaGalleriesPrivateGetHandlersFunction() {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 } 464 }
465 465
466 SetResult(result_list); 466 SetResult(result_list);
467 SendResponse(true); 467 SendResponse(true);
468 468
469 return true; 469 return true;
470 } 470 }
471 471
472 } // namespace extensions 472 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/management/management_api.cc ('k') | chrome/browser/extensions/api/module/module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698