1 // Copyright 2014 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.
5 #include "ios/web/web_thread_impl.h"
7 #include "base/logging.h"
11 content::BrowserThread::ID
BrowserThreadIDFromWebThreadID(
12 WebThread::ID identifier
) {
15 return content::BrowserThread::UI
;
17 return content::BrowserThread::DB
;
19 return content::BrowserThread::FILE;
20 case WebThread::FILE_USER_BLOCKING
:
21 return content::BrowserThread::FILE_USER_BLOCKING
;
22 case WebThread::CACHE
:
23 return content::BrowserThread::CACHE
;
25 return content::BrowserThread::IO
;
27 NOTREACHED() << "Unknown web::WebThread::ID: " << identifier
;
28 return content::BrowserThread::UI
;