| Index: chrome/service/cloud_print/cloud_print_helpers.cc
|
| ===================================================================
|
| --- chrome/service/cloud_print/cloud_print_helpers.cc (revision 104911)
|
| +++ chrome/service/cloud_print/cloud_print_helpers.cc (working copy)
|
| @@ -14,6 +14,7 @@
|
| #include "base/utf_string_conversions.h"
|
| #include "base/values.h"
|
| #include "chrome/service/cloud_print/cloud_print_consts.h"
|
| +#include "chrome/service/cloud_print/cloud_print_token_store.h"
|
| #include "chrome/service/service_process.h"
|
| #include "content/common/net/url_fetcher.h"
|
|
|
| @@ -267,3 +268,18 @@
|
| }
|
| return false;
|
| }
|
| +
|
| +std::string CloudPrintHelpers::GetCloudPrintAuthHeader() {
|
| + std::string header;
|
| + CloudPrintTokenStore* token_store = CloudPrintTokenStore::current();
|
| + if (!token_store || token_store->token().empty()) {
|
| + LOG(ERROR) << "CP_PROXY: Missing OAuth token for request";
|
| + }
|
| +
|
| + if (token_store) {
|
| + header = "Authorization: OAuth ";
|
| + header += token_store->token();
|
| + }
|
| + return header;
|
| +}
|
| +
|
|
|