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

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

Issue 3821005: Make sure to use scoped_refptr for refcounted params in audio/video/remoting (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host.cc ('k') | media/base/pipeline_impl.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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 const std::string& login, 377 const std::string& login,
378 const std::string& token, 378 const std::string& token,
379 const std::string& host_id, 379 const std::string& host_id,
380 const std::string& host_name, 380 const std::string& host_name,
381 remoting::HostKeyPair* host_key_pair) { 381 remoting::HostKeyPair* host_key_pair) {
382 // First we need to load the config first. 382 // First we need to load the config first.
383 LoadChromotingConfig(); 383 LoadChromotingConfig();
384 384
385 // And then do the update. 385 // And then do the update.
386 chromoting_config_->Update( 386 chromoting_config_->Update(
387 NewRunnableFunction(&SaveChromotingConfigFunc, chromoting_config_.get(), 387 NewRunnableFunction(&SaveChromotingConfigFunc,
388 login, token, host_id, host_name)); 388 chromoting_config_,
389 login,
390 token,
391 host_id,
392 host_name));
389 393
390 // And then save the key pair. 394 // And then save the key pair.
391 host_key_pair->Save(chromoting_config_); 395 host_key_pair->Save(chromoting_config_);
392 } 396 }
393 397
394 void ServiceProcess::LoadChromotingConfig() { 398 void ServiceProcess::LoadChromotingConfig() {
395 // TODO(hclam): We really should be doing this on IO thread so we are not 399 // TODO(hclam): We really should be doing this on IO thread so we are not
396 // blocked on file IOs. 400 // blocked on file IOs.
397 if (chromoting_config_) 401 if (chromoting_config_)
398 return; 402 return;
(...skipping 15 matching lines...) Expand all
414 #endif 418 #endif
415 419
416 ServiceProcess::~ServiceProcess() { 420 ServiceProcess::~ServiceProcess() {
417 Teardown(); 421 Teardown();
418 g_service_process = NULL; 422 g_service_process = NULL;
419 } 423 }
420 424
421 // Disable refcounting for runnable method because it is really not needed 425 // Disable refcounting for runnable method because it is really not needed
422 // when we post tasks on the main message loop. 426 // when we post tasks on the main message loop.
423 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcess); 427 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcess);
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host.cc ('k') | media/base/pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698