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/signin_header_helper.h" | 5 #include "chrome/browser/signin/signin_header_helper.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 10 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 244 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
245 extensions::WebViewRendererState::WebViewInfo webview_info; | 245 extensions::WebViewRendererState::WebViewInfo webview_info; |
246 bool is_guest = extensions::WebViewRendererState::GetInstance()->GetInfo( | 246 bool is_guest = extensions::WebViewRendererState::GetInstance()->GetInfo( |
247 child_id, route_id, &webview_info); | 247 child_id, route_id, &webview_info); |
248 // Do not set the x-chrome-connected header on requests from a native signin | 248 // Do not set the x-chrome-connected header on requests from a native signin |
249 // webview, as identified by an empty extension id which means the webview is | 249 // webview, as identified by an empty extension id which means the webview is |
250 // embedded in a webui page, otherwise user may end up with a blank page as | 250 // embedded in a webui page, otherwise user may end up with a blank page as |
251 // gaia uses the header to decide whether it returns 204 for certain end | 251 // gaia uses the header to decide whether it returns 204 for certain end |
252 // points. | 252 // points. |
253 if (is_guest && webview_info.owner_extension_id.empty()) | 253 if (is_guest && webview_info.owner_host.empty()) |
254 return false; | 254 return false; |
255 #endif // !OS_ANDROID && !OS_IOS | 255 #endif // !OS_ANDROID && !OS_IOS |
256 | 256 |
257 int profile_mode_mask = PROFILE_MODE_DEFAULT; | 257 int profile_mode_mask = PROFILE_MODE_DEFAULT; |
258 if (io_data->incognito_availibility()->GetValue() == | 258 if (io_data->incognito_availibility()->GetValue() == |
259 IncognitoModePrefs::DISABLED || | 259 IncognitoModePrefs::DISABLED || |
260 IncognitoModePrefs::ArePlatformParentalControlsEnabled()) { | 260 IncognitoModePrefs::ArePlatformParentalControlsEnabled()) { |
261 profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED; | 261 profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED; |
262 } | 262 } |
263 | 263 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 params.child_id = child_id; | 302 params.child_id = child_id; |
303 params.route_id = route_id; | 303 params.route_id = route_id; |
304 content::BrowserThread::PostTask( | 304 content::BrowserThread::PostTask( |
305 content::BrowserThread::UI, FROM_HERE, | 305 content::BrowserThread::UI, FROM_HERE, |
306 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); | 306 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); |
307 #endif // defined(OS_IOS) | 307 #endif // defined(OS_IOS) |
308 } | 308 } |
309 | 309 |
310 } // namespace signin | 310 } // namespace signin |
OLD | NEW |