| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 std::string* id_in_origin) { | 152 std::string* id_in_origin) { |
| 153 if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) { | 153 if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) { |
| 154 content::BrowserThread::PostTask( | 154 content::BrowserThread::PostTask( |
| 155 content::BrowserThread::IO, FROM_HERE, | 155 content::BrowserThread::IO, FROM_HERE, |
| 156 base::Bind(&WebrtcAudioPrivateTest::GetIDInOrigin, | 156 base::Bind(&WebrtcAudioPrivateTest::GetIDInOrigin, |
| 157 this, resource_context, origin, raw_device_id, | 157 this, resource_context, origin, raw_device_id, |
| 158 id_in_origin)); | 158 id_in_origin)); |
| 159 enumeration_event_.Wait(); | 159 enumeration_event_.Wait(); |
| 160 } else { | 160 } else { |
| 161 *id_in_origin = content::GetHMACForMediaDeviceID( | 161 *id_in_origin = content::GetHMACForMediaDeviceID( |
| 162 resource_context->GetMediaDeviceIDSalt(), | 162 resource_context->GetMediaDeviceIDSalt(), url::Origin(origin), |
| 163 origin, | |
| 164 raw_device_id); | 163 raw_device_id); |
| 165 enumeration_event_.Signal(); | 164 enumeration_event_.Signal(); |
| 166 } | 165 } |
| 167 } | 166 } |
| 168 | 167 |
| 169 // Event used to signal completion of enumeration. | 168 // Event used to signal completion of enumeration. |
| 170 base::WaitableEvent enumeration_event_; | 169 base::WaitableEvent enumeration_event_; |
| 171 | 170 |
| 172 GURL source_url_; | 171 GURL source_url_; |
| 173 }; | 172 }; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); | 426 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); |
| 428 base::string16 result = title_watcher.WaitAndGetTitle(); | 427 base::string16 result = title_watcher.WaitAndGetTitle(); |
| 429 EXPECT_EQ(base::ASCIIToUTF16("success"), result); | 428 EXPECT_EQ(base::ASCIIToUTF16("success"), result); |
| 430 | 429 |
| 431 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( | 430 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( |
| 432 NULL); | 431 NULL); |
| 433 } | 432 } |
| 434 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN
SION) | 433 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN
SION) |
| 435 | 434 |
| 436 } // namespace extensions | 435 } // namespace extensions |
| OLD | NEW |