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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 email(""), | 180 email(""), |
181 is_saml(false), | 181 is_saml(false), |
182 continue_url(""), | 182 continue_url(""), |
183 is_same_tab(false), | 183 is_same_tab(false), |
184 child_id(0), | 184 child_id(0), |
185 route_id(0) {} | 185 route_id(0) {} |
186 | 186 |
187 bool AppendMirrorRequestHeaderIfPossible( | 187 bool AppendMirrorRequestHeaderIfPossible( |
188 net::URLRequest* request, | 188 net::URLRequest* request, |
189 const GURL& redirect_url, | 189 const GURL& redirect_url, |
190 ProfileIOData* io_data, | 190 ProfileIOData* io_data) { |
191 int child_id, | |
192 int route_id) { | |
193 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 191 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
194 | 192 |
195 if (io_data->IsOffTheRecord() || | 193 if (io_data->IsOffTheRecord() || |
196 io_data->google_services_username()->GetValue().empty()) { | 194 io_data->google_services_username()->GetValue().empty()) { |
197 return false; | 195 return false; |
198 } | 196 } |
199 | 197 |
200 // Only set the header for Drive always, and other Google properties if | 198 // Only set the header for Drive always, and other Google properties if |
201 // new-profile-management is enabled. | 199 // new-profile-management is enabled. |
202 // Vasquette, which is integrated with most Google properties, needs the | 200 // Vasquette, which is integrated with most Google properties, needs the |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 264 |
267 params.child_id = child_id; | 265 params.child_id = child_id; |
268 params.route_id = route_id; | 266 params.route_id = route_id; |
269 content::BrowserThread::PostTask( | 267 content::BrowserThread::PostTask( |
270 content::BrowserThread::UI, FROM_HERE, | 268 content::BrowserThread::UI, FROM_HERE, |
271 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); | 269 base::Bind(ProcessMirrorHeaderUIThread, child_id, route_id, params)); |
272 #endif // defined(OS_IOS) | 270 #endif // defined(OS_IOS) |
273 } | 271 } |
274 | 272 |
275 } // namespace signin | 273 } // namespace signin |
OLD | NEW |