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

Side by Side Diff: chrome/service/service_process.cc

Issue 3581008: Fix instances of passing raw pointers to RefCounted objects in tasks. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge Created 10 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 | « chrome/profile_import/profile_import_thread.cc ('k') | ipc/ipc_channel_proxy.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/service_process.h" 5 #include "chrome/service/service_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 const std::string& login, 367 const std::string& login,
368 const std::string& token, 368 const std::string& token,
369 const std::string& host_id, 369 const std::string& host_id,
370 const std::string& host_name, 370 const std::string& host_name,
371 remoting::HostKeyPair* host_key_pair) { 371 remoting::HostKeyPair* host_key_pair) {
372 // First we need to load the config first. 372 // First we need to load the config first.
373 LoadChromotingConfig(); 373 LoadChromotingConfig();
374 374
375 // And then do the update. 375 // And then do the update.
376 chromoting_config_->Update( 376 chromoting_config_->Update(
377 NewRunnableFunction(&SaveChromotingConfigFunc, chromoting_config_.get(), 377 NewRunnableFunction(&SaveChromotingConfigFunc,
378 login, token, host_id, host_name)); 378 chromoting_config_,
379 login,
380 token,
381 host_id,
382 host_name));
379 383
380 // And then save the key pair. 384 // And then save the key pair.
381 host_key_pair->Save(chromoting_config_); 385 host_key_pair->Save(chromoting_config_);
382 } 386 }
383 387
384 void ServiceProcess::LoadChromotingConfig() { 388 void ServiceProcess::LoadChromotingConfig() {
385 // TODO(hclam): We really should be doing this on IO thread so we are not 389 // TODO(hclam): We really should be doing this on IO thread so we are not
386 // blocked on file IOs. 390 // blocked on file IOs.
387 if (chromoting_config_) 391 if (chromoting_config_)
388 return; 392 return;
(...skipping 15 matching lines...) Expand all
404 #endif 408 #endif
405 409
406 ServiceProcess::~ServiceProcess() { 410 ServiceProcess::~ServiceProcess() {
407 Teardown(); 411 Teardown();
408 g_service_process = NULL; 412 g_service_process = NULL;
409 } 413 }
410 414
411 // Disable refcounting for runnable method because it is really not needed 415 // Disable refcounting for runnable method because it is really not needed
412 // when we post tasks on the main message loop. 416 // when we post tasks on the main message loop.
413 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcess); 417 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcess);
OLDNEW
« no previous file with comments | « chrome/profile_import/profile_import_thread.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698