Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chromecast/shell/browser/cast_content_browser_client.cc

Issue 517213005: Chromecast: return the correct locale in ContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "chromecast/shell/browser/cast_content_browser_client.h" 5 #include "chromecast/shell/browser/cast_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chromecast/shell/browser/cast_browser_context.h" 8 #include "chromecast/shell/browser/cast_browser_context.h"
9 #include "chromecast/shell/browser/cast_browser_main_parts.h" 9 #include "chromecast/shell/browser/cast_browser_main_parts.h"
10 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h" 10 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 content::WebPreferences* prefs) { 90 content::WebPreferences* prefs) {
91 prefs->allow_scripts_to_close_windows = true; 91 prefs->allow_scripts_to_close_windows = true;
92 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default 92 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default
93 // because some content providers such as YouTube use plain http requests 93 // because some content providers such as YouTube use plain http requests
94 // to retrieve media data chunks while running in a https page. This pref 94 // to retrieve media data chunks while running in a https page. This pref
95 // should be disabled once all the content providers are no longer doing that. 95 // should be disabled once all the content providers are no longer doing that.
96 prefs->allow_running_insecure_content = true; 96 prefs->allow_running_insecure_content = true;
97 } 97 }
98 98
99 std::string CastContentBrowserClient::GetApplicationLocale() { 99 std::string CastContentBrowserClient::GetApplicationLocale() {
100 return "en-US"; 100 const std::string locale(base::i18n::GetConfiguredLocale());
101 return locale.empty() ? "en-US" : locale;
101 } 102 }
102 103
103 void CastContentBrowserClient::AllowCertificateError( 104 void CastContentBrowserClient::AllowCertificateError(
104 int render_process_id, 105 int render_process_id,
105 int render_view_id, 106 int render_view_id,
106 int cert_error, 107 int cert_error,
107 const net::SSLInfo& ssl_info, 108 const net::SSLInfo& ssl_info,
108 const GURL& request_url, 109 const GURL& request_url,
109 content::ResourceType resource_type, 110 content::ResourceType resource_type,
110 bool overridable, 111 bool overridable,
(...skipping 27 matching lines...) Expand all
138 } 139 }
139 140
140 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 141 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
141 const base::CommandLine& command_line, 142 const base::CommandLine& command_line,
142 int child_process_id, 143 int child_process_id,
143 std::vector<content::FileDescriptorInfo>* mappings) { 144 std::vector<content::FileDescriptorInfo>* mappings) {
144 } 145 }
145 146
146 } // namespace shell 147 } // namespace shell
147 } // namespace chromecast 148 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698