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

Side by Side Diff: content/browser/geolocation/network_location_request.cc

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 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 "content/browser/geolocation/network_location_request.h" 5 #include "content/browser/geolocation/network_location_request.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 url_fetcher_->SetLoadFlags( 93 url_fetcher_->SetLoadFlags(
94 net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE | 94 net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
95 net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES | 95 net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES |
96 net::LOAD_DO_NOT_SEND_AUTH_DATA); 96 net::LOAD_DO_NOT_SEND_AUTH_DATA);
97 97
98 url_fetcher_->Start(); 98 url_fetcher_->Start();
99 return true; 99 return true;
100 } 100 }
101 101
102 void NetworkLocationRequest::OnURLFetchComplete( 102 void NetworkLocationRequest::OnURLFetchComplete(
103 const content::URLFetcher* source) { 103 const net::URLFetcher* source) {
104 DCHECK_EQ(url_fetcher_.get(), source); 104 DCHECK_EQ(url_fetcher_.get(), source);
105 105
106 net::URLRequestStatus status = source->GetStatus(); 106 net::URLRequestStatus status = source->GetStatus();
107 int response_code = source->GetResponseCode(); 107 int response_code = source->GetResponseCode();
108 108
109 content::Geoposition position; 109 content::Geoposition position;
110 string16 access_token; 110 string16 access_token;
111 std::string data; 111 std::string data;
112 source->GetResponseAsString(&data); 112 source->GetResponseAsString(&data);
113 GetLocationFromResponse(status.is_success(), 113 GetLocationFromResponse(status.is_success(),
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 position->longitude = longitude; 408 position->longitude = longitude;
409 position->timestamp = timestamp; 409 position->timestamp = timestamp;
410 410
411 // Other fields are optional. 411 // Other fields are optional.
412 GetAsDouble(*response_object, kAccuracyString, &position->accuracy); 412 GetAsDouble(*response_object, kAccuracyString, &position->accuracy);
413 413
414 return true; 414 return true;
415 } 415 }
416 416
417 } // namespace 417 } // namespace
OLDNEW
« no previous file with comments | « content/browser/geolocation/network_location_request.h ('k') | content/browser/speech/google_one_shot_remote_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698