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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/tracker_id_set.cc

Issue 1731483003: chrome: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 "chrome/browser/sync_file_system/drive_backend/tracker_id_set.h" 5 #include "chrome/browser/sync_file_system/drive_backend/tracker_id_set.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" 9 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
10 10
11 namespace sync_file_system { 11 namespace sync_file_system {
12 namespace drive_backend { 12 namespace drive_backend {
13 13
14 TrackerIDSet::TrackerIDSet() : active_tracker_(0) {} 14 TrackerIDSet::TrackerIDSet() : active_tracker_(0) {}
15 15
16 TrackerIDSet::TrackerIDSet(const TrackerIDSet& other) = default;
17
16 TrackerIDSet::~TrackerIDSet() {} 18 TrackerIDSet::~TrackerIDSet() {}
17 19
18 void TrackerIDSet::Insert(const FileTracker& tracker) { 20 void TrackerIDSet::Insert(const FileTracker& tracker) {
19 if (tracker.active()) 21 if (tracker.active())
20 InsertActiveTracker(tracker.tracker_id()); 22 InsertActiveTracker(tracker.tracker_id());
21 else 23 else
22 InsertInactiveTracker(tracker.tracker_id()); 24 InsertInactiveTracker(tracker.tracker_id());
23 } 25 }
24 26
25 void TrackerIDSet::InsertActiveTracker(int64_t tracker_id) { 27 void TrackerIDSet::InsertActiveTracker(int64_t tracker_id) {
(...skipping 26 matching lines...) Expand all
52 } 54 }
53 55
54 void TrackerIDSet::Deactivate(int64_t tracker_id) { 56 void TrackerIDSet::Deactivate(int64_t tracker_id) {
55 DCHECK_EQ(active_tracker_, tracker_id); 57 DCHECK_EQ(active_tracker_, tracker_id);
56 DCHECK(ContainsKey(tracker_ids_, tracker_id)); 58 DCHECK(ContainsKey(tracker_ids_, tracker_id));
57 active_tracker_ = 0; 59 active_tracker_ = 0;
58 } 60 }
59 61
60 } // namespace drive_backend 62 } // namespace drive_backend
61 } // namespace sync_file_system 63 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698