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

Side by Side Diff: cloud_print/service/win/chrome_launcher.cc

Issue 1210013007: clang/win: Fix warnings to prepare for building without -Wno-reorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clang-unsequenced
Patch Set: Created 5 years, 5 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
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 "cloud_print/service/win/chrome_launcher.h" 5 #include "cloud_print/service/win/chrome_launcher.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 for (size_t i = 0; i < to_delete.size(); ++i) { 168 for (size_t i = 0; i < to_delete.size(); ++i) {
169 key.DeleteValue(to_delete[i].c_str()); 169 key.DeleteValue(to_delete[i].c_str());
170 } 170 }
171 } 171 }
172 172
173 } // namespace 173 } // namespace
174 174
175 ChromeLauncher::ChromeLauncher(const base::FilePath& user_data) 175 ChromeLauncher::ChromeLauncher(const base::FilePath& user_data)
176 : stop_event_(true, true), 176 : user_data_(user_data), stop_event_(true, true) {
177 user_data_(user_data) {
178 } 177 }
179 178
180 ChromeLauncher::~ChromeLauncher() { 179 ChromeLauncher::~ChromeLauncher() {
181 } 180 }
182 181
183 bool ChromeLauncher::Start() { 182 bool ChromeLauncher::Start() {
184 DeleteAutorunKeys(user_data_); 183 DeleteAutorunKeys(user_data_);
185 stop_event_.Reset(); 184 stop_event_.Reset();
186 thread_.reset(new base::DelegateSimpleThread(this, "chrome_launcher")); 185 thread_.reset(new base::DelegateSimpleThread(this, "chrome_launcher"));
187 thread_->Start(); 186 thread_->Start();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 LOG(ERROR) << "Chrome launch failed."; 320 LOG(ERROR) << "Chrome launch failed.";
322 return std::string(); 321 return std::string();
323 } 322 }
324 if (!json.empty()) { 323 if (!json.empty()) {
325 // Close chrome because Service State is ready. 324 // Close chrome because Service State is ready.
326 CloseChrome(chrome_process.Pass(), thread_id); 325 CloseChrome(chrome_process.Pass(), thread_id);
327 return json; 326 return json;
328 } 327 }
329 } 328 }
330 } 329 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698