OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/media_galleries/fileapi/itunes_finder.h" | 5 #include "chrome/browser/media_galleries/fileapi/itunes_finder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/storage_monitor/storage_info.h" | 9 #include "chrome/browser/storage_monitor/storage_info.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 FROM_HERE, | 54 FROM_HERE, |
55 base::Bind(&ITunesFinder::FinishOnUIThread, | 55 base::Bind(&ITunesFinder::FinishOnUIThread, |
56 base::Owned(this), | 56 base::Owned(this), |
57 unique_id)); | 57 unique_id)); |
58 } | 58 } |
59 | 59 |
60 void ITunesFinder::FinishOnUIThread(const std::string& unique_id) const { | 60 void ITunesFinder::FinishOnUIThread(const std::string& unique_id) const { |
61 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 61 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
62 | 62 |
63 std::string device_id; | 63 std::string device_id; |
64 if (!unique_id.empty()) { | 64 if (!unique_id.empty()) |
65 device_id = chrome::StorageInfo::MakeDeviceId(chrome::StorageInfo::ITUNES, | 65 device_id = StorageInfo::MakeDeviceId(StorageInfo::ITUNES, unique_id); |
66 unique_id); | |
67 } | |
68 callback_.Run(device_id); | 66 callback_.Run(device_id); |
69 } | 67 } |
70 | 68 |
71 } // namespace itunes | 69 } // namespace itunes |
OLD | NEW |