OLD | NEW |
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 "chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetche
r.h" | 5 #include "chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetche
r.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/common/net/gaia/google_service_auth_error.h" | 11 #include "google_apis/gaia/google_service_auth_error.h" |
12 #include "net/url_request/url_fetcher.h" | 12 #include "net/url_request/url_fetcher.h" |
13 #include "net/url_request/url_request_status.h" | 13 #include "net/url_request/url_request_status.h" |
14 | 14 |
15 using net::URLFetcher; | 15 using net::URLFetcher; |
16 using net::URLRequestContextGetter; | 16 using net::URLRequestContextGetter; |
17 using net::URLRequestStatus; | 17 using net::URLRequestStatus; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // URL of the service to get obfuscated Gaia ID (here misnamed channel ID). | 21 // URL of the service to get obfuscated Gaia ID (here misnamed channel ID). |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return false; | 122 return false; |
123 | 123 |
124 DictionaryValue* dict = NULL; | 124 DictionaryValue* dict = NULL; |
125 if (!value->GetAsDictionary(&dict)) | 125 if (!value->GetAsDictionary(&dict)) |
126 return false; | 126 return false; |
127 | 127 |
128 return dict->GetString("id", result); | 128 return dict->GetString("id", result); |
129 } | 129 } |
130 | 130 |
131 } // namespace extensions | 131 } // namespace extensions |
OLD | NEW |