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

Side by Side Diff: chrome/service/cloud_print/cloud_print_wipeout.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 "chrome/service/cloud_print/cloud_print_wipeout.h" 5 #include "chrome/service/cloud_print/cloud_print_wipeout.h"
6 6
7 #include "chrome/service/cloud_print/cloud_print_consts.h" 7 #include "chrome/service/cloud_print/cloud_print_consts.h"
8 #include "chrome/service/cloud_print/cloud_print_helpers.h" 8 #include "chrome/service/cloud_print/cloud_print_helpers.h"
9 9
10 const int kMaxWipeoutAttempts = 3; 10 const int kMaxWipeoutAttempts = 3;
(...skipping 23 matching lines...) Expand all
34 printer_ids_.pop_front(); 34 printer_ids_.pop_front();
35 35
36 GURL url = CloudPrintHelpers::GetUrlForPrinterDelete(cloud_print_server_url_, 36 GURL url = CloudPrintHelpers::GetUrlForPrinterDelete(cloud_print_server_url_,
37 printer_id, 37 printer_id,
38 "connector_disabled"); 38 "connector_disabled");
39 request_ = new CloudPrintURLFetcher; 39 request_ = new CloudPrintURLFetcher;
40 request_->StartGetRequest(url, this, kMaxWipeoutAttempts, std::string()); 40 request_->StartGetRequest(url, this, kMaxWipeoutAttempts, std::string());
41 } 41 }
42 42
43 CloudPrintURLFetcher::ResponseAction CloudPrintWipeout::HandleJSONData( 43 CloudPrintURLFetcher::ResponseAction CloudPrintWipeout::HandleJSONData(
44 const content::URLFetcher* source, 44 const net::URLFetcher* source,
45 const GURL& url, 45 const GURL& url,
46 base::DictionaryValue* json_data, 46 base::DictionaryValue* json_data,
47 bool succeeded) { 47 bool succeeded) {
48 // We don't care if delete was sucessful or not here. 48 // We don't care if delete was sucessful or not here.
49 UnregisterNextPrinter(); 49 UnregisterNextPrinter();
50 return CloudPrintURLFetcher::STOP_PROCESSING; 50 return CloudPrintURLFetcher::STOP_PROCESSING;
51 } 51 }
52 52
53 void CloudPrintWipeout::OnRequestGiveUp() { 53 void CloudPrintWipeout::OnRequestGiveUp() {
54 UnregisterNextPrinter(); 54 UnregisterNextPrinter();
55 } 55 }
56 56
57 CloudPrintURLFetcher::ResponseAction CloudPrintWipeout::OnRequestAuthError() { 57 CloudPrintURLFetcher::ResponseAction CloudPrintWipeout::OnRequestAuthError() {
58 // We can't recover from auth rrror. Report complition to stop service. 58 // We can't recover from auth rrror. Report complition to stop service.
59 client_->OnUnregisterPrintersComplete(); 59 client_->OnUnregisterPrintersComplete();
60 return CloudPrintURLFetcher::STOP_PROCESSING; 60 return CloudPrintURLFetcher::STOP_PROCESSING;
61 } 61 }
62 62
63 std::string CloudPrintWipeout::GetAuthHeader() { 63 std::string CloudPrintWipeout::GetAuthHeader() {
64 return CloudPrintHelpers::GetCloudPrintAuthHeader(auth_token_); 64 return CloudPrintHelpers::GetCloudPrintAuthHeader(auth_token_);
65 } 65 }
66 66
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_wipeout.h ('k') | chrome/service/cloud_print/job_status_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698