| Index: chrome/browser/sync/engine/net/syncapi_server_connection_manager.cc
|
| diff --git a/chrome/browser/sync/engine/net/syncapi_server_connection_manager.cc b/chrome/browser/sync/engine/net/syncapi_server_connection_manager.cc
|
| index 3ba02b44b1958bed7b9ce816f03b5091a6c96e80..2916a4b526bfebe739f4733ed53bc5fc4b210aaa 100644
|
| --- a/chrome/browser/sync/engine/net/syncapi_server_connection_manager.cc
|
| +++ b/chrome/browser/sync/engine/net/syncapi_server_connection_manager.cc
|
| @@ -4,9 +4,12 @@
|
|
|
| #include "chrome/browser/sync/engine/net/syncapi_server_connection_manager.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "chrome/browser/sync/engine/http_post_provider_factory.h"
|
| #include "chrome/browser/sync/engine/http_post_provider_interface.h"
|
| #include "chrome/browser/sync/engine/syncapi.h"
|
| +#include "chrome/browser/sync/sync_setup_wizard.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/net/http_return.h"
|
|
|
| using browser_sync::HttpResponse;
|
| @@ -36,7 +39,12 @@ bool SyncAPIBridgedPost::Init(const char* path,
|
| http->SetURL(connection_url.c_str(), sync_server_port);
|
|
|
| if (!auth_token.empty()) {
|
| - std::string headers = "Authorization: GoogleLogin auth=" + auth_token;
|
| + std::string headers;
|
| + if (SyncSetupWizard::IsUsingOAuth()) {
|
| + headers = "Authorization: OAuth " + auth_token;
|
| + } else {
|
| + headers = "Authorization: GoogleLogin auth=" + auth_token;
|
| + }
|
| http->SetExtraRequestHeaders(headers.c_str());
|
| }
|
|
|
|
|