Merge lp:~zaspire/oxide/navigator-language into lp:~oxide-developers/oxide/oxide.trunk

Proposed by Maxim Ermilov
Status: Merged
Merged at revision: 1016
Proposed branch: lp:~zaspire/oxide/navigator-language
Merge into: lp:~oxide-developers/oxide/oxide.trunk
Diff against target: 66 lines (+14/-0)
5 files modified
qt/core/browser/oxide_qt_browser_platform_integration.cc (+5/-0)
qt/core/browser/oxide_qt_browser_platform_integration.h (+1/-0)
shared/browser/oxide_browser_platform_integration.h (+2/-0)
shared/browser/oxide_content_browser_client.cc (+5/-0)
shared/browser/oxide_content_browser_client.h (+1/-0)
To merge this branch: bzr merge lp:~zaspire/oxide/navigator-language
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+253314@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, this looks fine.

I believe there might also be a second bug - in oxide::ContentMainDelegate::PreSandboxStartup we call ui::ResourceBundle::InitSharedInstanceWithLocale with an empty locale to rely on Chromium to select the correct locale (and load the right resource file, which is needed to get the correct Accept-Language header). But this only works when Chromium is built with the glib bits turned on, which I don't think we do anymore. If that's the case, we also need to pass the application locale to InitSharedInstanceWithLocale (it would mean adding a second method - PlatformDelegate::GetApplicationLocale - in addition to the one added in this merge).

Would you mind taking a look at that too?

review: Approve
Revision history for this message
Maxim Ermilov (zaspire) wrote :

> Would you mind taking a look at that too?

I will look at it

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qt/core/browser/oxide_qt_browser_platform_integration.cc'
--- qt/core/browser/oxide_qt_browser_platform_integration.cc 2015-01-16 23:04:18 +0000
+++ qt/core/browser/oxide_qt_browser_platform_integration.cc 2015-03-18 08:27:26 +0000
@@ -140,6 +140,11 @@
140 }140 }
141}141}
142142
143std::string
144BrowserPlatformIntegration::GetApplicationLocale() {
145 return QLocale::system().name().toStdString();
146}
147
143QThread* GetIOQThread() {148QThread* GetIOQThread() {
144 return g_io_thread.Get();149 return g_io_thread.Get();
145}150}
146151
=== modified file 'qt/core/browser/oxide_qt_browser_platform_integration.h'
--- qt/core/browser/oxide_qt_browser_platform_integration.h 2014-11-14 14:36:14 +0000
+++ qt/core/browser/oxide_qt_browser_platform_integration.h 2015-03-18 08:27:26 +0000
@@ -56,6 +56,7 @@
56 void BrowserThreadInit(content::BrowserThread::ID id) final;56 void BrowserThreadInit(content::BrowserThread::ID id) final;
57 content::LocationProvider* CreateLocationProvider() final;57 content::LocationProvider* CreateLocationProvider() final;
58 ApplicationState GetApplicationState() final;58 ApplicationState GetApplicationState() final;
59 std::string GetApplicationLocale() final;
5960
60 scoped_refptr<GLContextAdopted> gl_share_context_;61 scoped_refptr<GLContextAdopted> gl_share_context_;
6162
6263
=== modified file 'shared/browser/oxide_browser_platform_integration.h'
--- shared/browser/oxide_browser_platform_integration.h 2014-11-14 14:31:59 +0000
+++ shared/browser/oxide_browser_platform_integration.h 2015-03-18 08:27:26 +0000
@@ -71,6 +71,8 @@
7171
72 virtual ApplicationState GetApplicationState();72 virtual ApplicationState GetApplicationState();
7373
74 virtual std::string GetApplicationLocale() = 0;
75
74 protected:76 protected:
75 BrowserPlatformIntegration();77 BrowserPlatformIntegration();
7678
7779
=== modified file 'shared/browser/oxide_content_browser_client.cc'
--- shared/browser/oxide_content_browser_client.cc 2015-03-05 11:39:38 +0000
+++ shared/browser/oxide_content_browser_client.cc 2015-03-18 08:27:26 +0000
@@ -388,4 +388,9 @@
388 return gpu::GpuControlList::kOsAndroid;388 return gpu::GpuControlList::kOsAndroid;
389}389}
390390
391std::string
392ContentBrowserClient::GetApplicationLocale() {
393 return platform_integration_->GetApplicationLocale();
394}
395
391} // namespace oxide396} // namespace oxide
392397
=== modified file 'shared/browser/oxide_content_browser_client.h'
--- shared/browser/oxide_content_browser_client.h 2015-03-05 11:39:38 +0000
+++ shared/browser/oxide_content_browser_client.h 2015-03-18 08:27:26 +0000
@@ -55,6 +55,7 @@
55 void SetPlatformIntegration(BrowserPlatformIntegration* integration);55 void SetPlatformIntegration(BrowserPlatformIntegration* integration);
5656
57 // content::ContentBrowserClient implementation57 // content::ContentBrowserClient implementation
58 std::string GetApplicationLocale() final;
58 content::BrowserMainParts* CreateBrowserMainParts(59 content::BrowserMainParts* CreateBrowserMainParts(
59 const content::MainFunctionParams& parameters) final;60 const content::MainFunctionParams& parameters) final;
60 void RenderProcessWillLaunch(content::RenderProcessHost* host) final;61 void RenderProcessWillLaunch(content::RenderProcessHost* host) final;

Subscribers

People subscribed via source and target branches