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/signin/principals_message_filter.h" | 5 #include "chrome/browser/signin/principals_message_filter.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 | 9 |
10 PrincipalsMessageFilter::PrincipalsMessageFilter(int render_process_id) | 10 PrincipalsMessageFilter::PrincipalsMessageFilter(int render_process_id) |
11 : BrowserMessageFilter(ChromeMsgStart), | 11 : render_process_id_(render_process_id) {} |
12 render_process_id_(render_process_id) {} | |
13 | 12 |
14 PrincipalsMessageFilter::~PrincipalsMessageFilter(){} | 13 PrincipalsMessageFilter::~PrincipalsMessageFilter(){} |
15 | 14 |
16 void PrincipalsMessageFilter::OverrideThreadForMessage( | 15 void PrincipalsMessageFilter::OverrideThreadForMessage( |
17 const IPC::Message& message, | 16 const IPC::Message& message, |
18 content::BrowserThread::ID* thread) { | 17 content::BrowserThread::ID* thread) { |
19 // GetManagedAccounts message is synchronous, it must be handled in the IO | 18 // GetManagedAccounts message is synchronous, it must be handled in the IO |
20 // thread, so no need to change thread, otherwise switch to UI thread | 19 // thread, so no need to change thread, otherwise switch to UI thread |
21 if (message.type() == ChromeViewHostMsg_ShowBrowserAccountManagementUI::ID) | 20 if (message.type() == ChromeViewHostMsg_ShowBrowserAccountManagementUI::ID) |
22 *thread = content::BrowserThread::UI; | 21 *thread = content::BrowserThread::UI; |
(...skipping 17 matching lines...) Expand all Loading... |
40 | 39 |
41 void PrincipalsMessageFilter::OnMsgShowBrowserAccountManagementUI(){ | 40 void PrincipalsMessageFilter::OnMsgShowBrowserAccountManagementUI(){ |
42 // TODO(guohui) | 41 // TODO(guohui) |
43 } | 42 } |
44 | 43 |
45 void PrincipalsMessageFilter::OnMsgGetManagedAccounts( | 44 void PrincipalsMessageFilter::OnMsgGetManagedAccounts( |
46 const GURL& url, std::vector<std::string>* managed_accounts) { | 45 const GURL& url, std::vector<std::string>* managed_accounts) { |
47 // TODO(guohui) | 46 // TODO(guohui) |
48 } | 47 } |
49 | 48 |
OLD | NEW |