Chromium Code Reviews| Index: chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
| diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
| index e3bfc924f2cb2f1abdae72804f1179212c514c76..e07ad65feaf5df76209f7c1a0ec701a81a034a2c 100644 |
| --- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
| +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/bind.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "base/threading/worker_pool.h" |
| #include "chrome/browser/content_settings/host_content_settings_map.h" |
| #include "chrome/browser/content_settings/permission_request_id.h" |
| #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| @@ -134,12 +135,24 @@ void ChromeGeolocationPermissionContext::DecidePermission( |
| PermissionDecided(id, requesting_frame, embedder, callback, true); |
| break; |
| default: |
| - // setting == ask. Prompt the user. |
| + // setting == ask. Prompt the user in the UI thread now. |
|
bulach
2013/09/04 18:48:53
hmm, isn't this already on the UI thread as per 12
acleung1
2013/09/05 21:50:16
Good point. Done.
|
| + content::BrowserThread::PostTask( |
| + content::BrowserThread::UI, FROM_HERE, |
| + base::Bind( |
| + &ChromeGeolocationPermissionContext::CreateInfoBarRequest, |
| + base::Unretained(this), id, requesting_frame, embedder,callback)); |
| + } |
| +} |
| + |
| +void ChromeGeolocationPermissionContext::CreateInfoBarRequest( |
| + const PermissionRequestID& id, |
| + const GURL& requesting_frame, |
| + const GURL& embedder, |
| + base::Callback<void(bool)> callback) { |
| QueueController()->CreateInfoBarRequest( |
|
bulach
2013/09/04 18:48:53
nit: indentation
acleung1
2013/09/05 21:50:16
Done.
|
| id, requesting_frame, embedder, base::Bind( |
| &ChromeGeolocationPermissionContext::NotifyPermissionSet, |
| base::Unretained(this), id, requesting_frame, callback)); |
| - } |
| } |
| void ChromeGeolocationPermissionContext::ShutdownOnUIThread() { |