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

Side by Side Diff: components/gcm_driver/gcm_driver_desktop.cc

Issue 1552023002: Convert Pass()→std::move() in //components (CrOS edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « components/drive/file_system_unittest.cc ('k') | components/ownership/owner_key_util.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 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 "components/gcm_driver/gcm_driver_desktop.h" 5 #include "components/gcm_driver/gcm_driver_desktop.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 void GCMDriverDesktop::IOWorker::WakeFromSuspendForHeartbeat(bool wake) { 473 void GCMDriverDesktop::IOWorker::WakeFromSuspendForHeartbeat(bool wake) {
474 #if defined(OS_CHROMEOS) 474 #if defined(OS_CHROMEOS)
475 DCHECK(io_thread_->RunsTasksOnCurrentThread()); 475 DCHECK(io_thread_->RunsTasksOnCurrentThread());
476 476
477 scoped_ptr<base::Timer> timer; 477 scoped_ptr<base::Timer> timer;
478 if (wake) 478 if (wake)
479 timer.reset(new timers::SimpleAlarmTimer()); 479 timer.reset(new timers::SimpleAlarmTimer());
480 else 480 else
481 timer.reset(new base::Timer(true, false)); 481 timer.reset(new base::Timer(true, false));
482 482
483 gcm_client_->UpdateHeartbeatTimer(timer.Pass()); 483 gcm_client_->UpdateHeartbeatTimer(std::move(timer));
484 #endif 484 #endif
485 } 485 }
486 486
487 void GCMDriverDesktop::IOWorker::AddHeartbeatInterval(const std::string& scope, 487 void GCMDriverDesktop::IOWorker::AddHeartbeatInterval(const std::string& scope,
488 int interval_ms) { 488 int interval_ms) {
489 DCHECK(io_thread_->RunsTasksOnCurrentThread()); 489 DCHECK(io_thread_->RunsTasksOnCurrentThread());
490 gcm_client_->AddHeartbeatInterval(scope, interval_ms); 490 gcm_client_->AddHeartbeatInterval(scope, interval_ms);
491 } 491 }
492 492
493 void GCMDriverDesktop::IOWorker::RemoveHeartbeatInterval( 493 void GCMDriverDesktop::IOWorker::RemoveHeartbeatInterval(
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 1301
1302 if (base::get<1>(a) < base::get<1>(b)) 1302 if (base::get<1>(a) < base::get<1>(b))
1303 return true; 1303 return true;
1304 if (base::get<1>(a) > base::get<1>(b)) 1304 if (base::get<1>(a) > base::get<1>(b))
1305 return false; 1305 return false;
1306 1306
1307 return base::get<2>(a) < base::get<2>(b); 1307 return base::get<2>(a) < base::get<2>(b);
1308 } 1308 }
1309 1309
1310 } // namespace gcm 1310 } // namespace gcm
OLDNEW
« no previous file with comments | « components/drive/file_system_unittest.cc ('k') | components/ownership/owner_key_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698