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

Side by Side Diff: chrome/browser/local_discovery/privetv3_session.cc

Issue 618453003: Enable V3 fetcher mode for privet v3 session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/local_discovery/privetv3_session.h" 5 #include "chrome/browser/local_discovery/privetv3_session.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/local_discovery/privet_http.h" 10 #include "chrome/browser/local_discovery/privet_http.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 scoped_ptr<PrivetURLFetcher> url_fetcher = 126 scoped_ptr<PrivetURLFetcher> url_fetcher =
127 client_->CreateURLFetcher(CreatePrivetURL(request->GetName()), 127 client_->CreateURLFetcher(CreatePrivetURL(request->GetName()),
128 net::URLFetcher::POST, 128 net::URLFetcher::POST,
129 request->fetcher_delegate_.get()); 129 request->fetcher_delegate_.get());
130 std::string json; 130 std::string json;
131 base::JSONWriter::WriteWithOptions( 131 base::JSONWriter::WriteWithOptions(
132 &request->GetInput(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); 132 &request->GetInput(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json);
133 url_fetcher->SetUploadData(cloud_print::kContentTypeJSON, json); 133 url_fetcher->SetUploadData(cloud_print::kContentTypeJSON, json);
134 134
135 request->fetcher_delegate_->url_fetcher_ = url_fetcher.Pass(); 135 request->fetcher_delegate_->url_fetcher_ = url_fetcher.Pass();
136 request->fetcher_delegate_->url_fetcher_->V3Mode();
136 request->fetcher_delegate_->url_fetcher_->Start(); 137 request->fetcher_delegate_->url_fetcher_->Start();
137 } 138 }
138 139
139 void PrivetV3Session::ConfirmFakeCode() { 140 void PrivetV3Session::ConfirmFakeCode() {
140 delegate_->OnSetupConfirmationNeeded( 141 delegate_->OnSetupConfirmationNeeded(
141 kStubPrivetCode, 142 kStubPrivetCode,
142 extensions::api::gcd_private::CONFIRMATION_TYPE_DISPLAYCODE); 143 extensions::api::gcd_private::CONFIRMATION_TYPE_DISPLAYCODE);
143 } 144 }
144 145
145 } // namespace local_discovery 146 } // namespace local_discovery
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698