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

Side by Side Diff: chrome/browser/extensions/api/music_manager_private/music_manager_private_api.cc

Issue 15738013: Initial implementation of music manager private API. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebasing. Created 7 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/api/music_manager_private/music_manager_priv ate_api.h"
6 #include "chrome/browser/extensions/api/music_manager_private/device_id.h"
7
8 using content::BrowserThread;
9
10 namespace {
11
12 const char kDeviceIDNotSupported[] =
13 "Device ID API is not supported on this platform.";
14
15 }
16
17 namespace extensions {
18
19 namespace api {
20
21 MusicManagerPrivateGetDeviceIdFunction::
22 MusicManagerPrivateGetDeviceIdFunction() {
23 }
24
25 MusicManagerPrivateGetDeviceIdFunction::
26 ~MusicManagerPrivateGetDeviceIdFunction() {
27 }
28
29 bool MusicManagerPrivateGetDeviceIdFunction::RunImpl() {
30 std::string salt = this->extension_id();
31 std::string result = device_id::GetDeviceID(salt);
32 bool response;
33 if (result.empty()) {
34 SetError(kDeviceIDNotSupported);
35 response = false;
36 } else {
37 SetResult(Value::CreateStringValue(result));
38 response = true;
39 }
40
41 SendResponse(response);
42 return response;
43 }
44
45 } // namespace api
46
47 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698