| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // points. | 249 // points. |
| 250 if (is_guest && webview_info.owner_extension_id.empty()) | 250 if (is_guest && webview_info.owner_extension_id.empty()) |
| 251 return false; | 251 return false; |
| 252 #endif // !OS_ANDROID && !OS_IOS | 252 #endif // !OS_ANDROID && !OS_IOS |
| 253 | 253 |
| 254 std::string account_id(io_data->google_services_account_id()->GetValue()); | 254 std::string account_id(io_data->google_services_account_id()->GetValue()); |
| 255 | 255 |
| 256 int profile_mode_mask = PROFILE_MODE_DEFAULT; | 256 int profile_mode_mask = PROFILE_MODE_DEFAULT; |
| 257 if (io_data->incognito_availibility()->GetValue() == | 257 if (io_data->incognito_availibility()->GetValue() == |
| 258 IncognitoModePrefs::DISABLED || | 258 IncognitoModePrefs::DISABLED || |
| 259 IncognitoModePrefs::ArePlatformParentalControlsEnabledCached()) { | 259 IncognitoModePrefs::ArePlatformParentalControlsEnabled()) { |
| 260 profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED; | 260 profile_mode_mask |= PROFILE_MODE_INCOGNITO_DISABLED; |
| 261 } | 261 } |
| 262 | 262 |
| 263 std::string header_value(base::StringPrintf("%s=%s,%s=%s,%s=%s", | 263 std::string header_value(base::StringPrintf("%s=%s,%s=%s,%s=%s", |
| 264 kGaiaIdAttrName, account_id.c_str(), | 264 kGaiaIdAttrName, account_id.c_str(), |
| 265 kProfileModeAttrName, base::IntToString(profile_mode_mask).c_str(), | 265 kProfileModeAttrName, base::IntToString(profile_mode_mask).c_str(), |
| 266 kEnableAccountConsistencyAttrName, | 266 kEnableAccountConsistencyAttrName, |
| 267 is_enable_account_consistency ? "true" : "false")); | 267 is_enable_account_consistency ? "true" : "false")); |
| 268 request->SetExtraRequestHeaderByName( | 268 request->SetExtraRequestHeaderByName( |
| 269 kChromeConnectedHeader, header_value, false); | 269 kChromeConnectedHeader, header_value, false); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 300 | 300 |
| 301 params.child_id = child_id; | 301 params.child_id = child_id; |
| 302 params.route_id = route_id; | 302 params.route_id = route_id; |
| 303 content::BrowserThread::PostTask( | 303 content::BrowserThread::PostTask( |
| 304 content::BrowserThread::UI, FROM_HERE, | 304 content::BrowserThread::UI, FROM_HERE, |
| 305 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); | 305 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); |
| 306 #endif // defined(OS_IOS) | 306 #endif // defined(OS_IOS) |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace signin | 309 } // namespace signin |
| OLD | NEW |