Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: google_apis/gaia/oauth2_access_token_fetcher.cc

Issue 18156002: Use a direct include of time headers in courgette/, crypto/, dbus/, device/, google_apis/, gpu/, ip… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "google_apis/gaia/oauth2_access_token_fetcher.h" 5 #include "google_apis/gaia/oauth2_access_token_fetcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "google_apis/gaia/gaia_urls.h" 16 #include "google_apis/gaia/gaia_urls.h"
17 #include "google_apis/gaia/google_service_auth_error.h" 17 #include "google_apis/gaia/google_service_auth_error.h"
18 #include "net/base/escape.h" 18 #include "net/base/escape.h"
19 #include "net/base/load_flags.h" 19 #include "net/base/load_flags.h"
20 #include "net/http/http_status_code.h" 20 #include "net/http/http_status_code.h"
21 #include "net/url_request/url_fetcher.h" 21 #include "net/url_request/url_fetcher.h"
22 #include "net/url_request/url_request_context_getter.h" 22 #include "net/url_request/url_request_context_getter.h"
23 #include "net/url_request/url_request_status.h" 23 #include "net/url_request/url_request_status.h"
24 24
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 source->GetResponseAsString(&data); 224 source->GetResponseAsString(&data);
225 scoped_ptr<base::Value> value(base::JSONReader::Read(data)); 225 scoped_ptr<base::Value> value(base::JSONReader::Read(data));
226 if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY) 226 if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY)
227 return false; 227 return false;
228 228
229 base::DictionaryValue* dict = 229 base::DictionaryValue* dict =
230 static_cast<base::DictionaryValue*>(value.get()); 230 static_cast<base::DictionaryValue*>(value.get());
231 return dict->GetString(kAccessTokenKey, access_token) && 231 return dict->GetString(kAccessTokenKey, access_token) &&
232 dict->GetInteger(kExpiresInKey, expires_in); 232 dict->GetInteger(kExpiresInKey, expires_in);
233 } 233 }
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | google_apis/gaia/oauth2_api_call_flow_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698