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

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

Issue 597313002: GCD Private API: Change hardcoded code to 4 digits not 5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test 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 | chrome/test/data/extensions/api_test/gcd_private/api/session.js » ('j') | 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"
11 #include "chrome/common/cloud_print/cloud_print_constants.h" 11 #include "chrome/common/cloud_print/cloud_print_constants.h"
12 12
13 namespace local_discovery { 13 namespace local_discovery {
14 14
15 namespace { 15 namespace {
16 16
17 const char kUrlPlaceHolder[] = "http://host/"; 17 const char kUrlPlaceHolder[] = "http://host/";
18 18
19 const char kStubPrivetCode[] = "01234"; 19 const char kStubPrivetCode[] = "1234";
20 20
21 GURL CreatePrivetURL(const std::string& path) { 21 GURL CreatePrivetURL(const std::string& path) {
22 GURL url(kUrlPlaceHolder); 22 GURL url(kUrlPlaceHolder);
23 GURL::Replacements replacements; 23 GURL::Replacements replacements;
24 replacements.SetPathStr(path); 24 replacements.SetPathStr(path);
25 return url.ReplaceComponents(replacements); 25 return url.ReplaceComponents(replacements);
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 request->fetcher_delegate_->url_fetcher_->Start(); 136 request->fetcher_delegate_->url_fetcher_->Start();
137 } 137 }
138 138
139 void PrivetV3Session::ConfirmFakeCode() { 139 void PrivetV3Session::ConfirmFakeCode() {
140 delegate_->OnSetupConfirmationNeeded( 140 delegate_->OnSetupConfirmationNeeded(
141 kStubPrivetCode, 141 kStubPrivetCode,
142 extensions::api::gcd_private::CONFIRMATION_TYPE_DISPLAYCODE); 142 extensions::api::gcd_private::CONFIRMATION_TYPE_DISPLAYCODE);
143 } 143 }
144 144
145 } // namespace local_discovery 145 } // namespace local_discovery
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/gcd_private/api/session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698