OLD | NEW |
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/extensions/api/music_manager_private/music_manager_priv
ate_api.h" | 5 #include "chrome/browser/extensions/api/music_manager_private/music_manager_priv
ate_api.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "chrome/browser/extensions/api/music_manager_private/device_id.h" | 8 #include "chrome/browser/extensions/api/music_manager_private/device_id.h" |
9 | 9 |
10 using content::BrowserThread; | 10 using content::BrowserThread; |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 void MusicManagerPrivateGetDeviceIdFunction::DeviceIdCallback( | 40 void MusicManagerPrivateGetDeviceIdFunction::DeviceIdCallback( |
41 const std::string& device_id) { | 41 const std::string& device_id) { |
42 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 42 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
43 bool response; | 43 bool response; |
44 if (device_id.empty()) { | 44 if (device_id.empty()) { |
45 SetError(kDeviceIdNotSupported); | 45 SetError(kDeviceIdNotSupported); |
46 response = false; | 46 response = false; |
47 } else { | 47 } else { |
48 SetResult(base::MakeUnique<base::StringValue>(device_id)); | 48 SetResult(base::MakeUnique<base::Value>(device_id)); |
49 response = true; | 49 response = true; |
50 } | 50 } |
51 | 51 |
52 SendResponse(response); | 52 SendResponse(response); |
53 } | 53 } |
54 | 54 |
55 } // namespace api | 55 } // namespace api |
56 } // namespace extensions | 56 } // namespace extensions |
OLD | NEW |