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

Side by Side Diff: cloud_print/gcp20/prototype/printer.cc

Issue 735053002: Prefix CommandLine usage with base namespace (Part 7: cloud_print/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cloud_print/gcp20/prototype/printer.h" 5 #include "cloud_print/gcp20/prototype/printer.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 if (state_.registration_state != PrinterState::UNREGISTERED) 227 if (state_.registration_state != PrinterState::UNREGISTERED)
228 return PrivetHttpServer::REG_ERROR_INVALID_ACTION; 228 return PrivetHttpServer::REG_ERROR_INVALID_ACTION;
229 229
230 UpdateRegistrationExpiration(); 230 UpdateRegistrationExpiration();
231 231
232 state_ = PrinterState(); 232 state_ = PrinterState();
233 state_.user = user; 233 state_.user = user;
234 state_.registration_state = PrinterState::REGISTRATION_STARTED; 234 state_.registration_state = PrinterState::REGISTRATION_STARTED;
235 235
236 if (CommandLine::ForCurrentProcess()->HasSwitch("disable-confirmation")) { 236 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
237 "disable-confirmation")) {
237 state_.confirmation_state = PrinterState::CONFIRMATION_CONFIRMED; 238 state_.confirmation_state = PrinterState::CONFIRMATION_CONFIRMED;
238 VLOG(0) << "Registration confirmed by default."; 239 VLOG(0) << "Registration confirmed by default.";
239 } else { 240 } else {
240 LOG(WARNING) << kUserConfirmationTitle; 241 LOG(WARNING) << kUserConfirmationTitle;
241 base::Time valid_until = base::Time::Now() + 242 base::Time valid_until = base::Time::Now() +
242 base::TimeDelta::FromSeconds(kUserConfirmationTimeout); 243 base::TimeDelta::FromSeconds(kUserConfirmationTimeout);
243 base::MessageLoop::current()->PostTask( 244 base::MessageLoop::current()->PostTask(
244 FROM_HERE, 245 FROM_HERE,
245 base::Bind(&Printer::WaitUserConfirmation, AsWeakPtr(), valid_until)); 246 base::Bind(&Printer::WaitUserConfirmation, AsWeakPtr(), valid_until));
246 } 247 }
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 956
956 dns_server_.UpdateMetadata(CreateTxt()); 957 dns_server_.UpdateMetadata(CreateTxt());
957 958
958 if (connection_state_ == OFFLINE) { 959 if (connection_state_ == OFFLINE) {
959 requester_.reset(); 960 requester_.reset();
960 xmpp_listener_.reset(); 961 xmpp_listener_.reset();
961 } 962 }
962 963
963 return true; 964 return true;
964 } 965 }
OLDNEW
« no previous file with comments | « cloud_print/gcp20/prototype/print_job_handler.cc ('k') | cloud_print/gcp20/prototype/privet_http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698