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

Side by Side Diff: components/drive/file_write_watcher.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/drive/file_write_watcher.h" 5 #include "components/drive/file_write_watcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 FROM_HERE, 108 FROM_HERE,
109 base::Bind(&FileWriteWatcherImpl::StartWatchOnFileThread, 109 base::Bind(&FileWriteWatcherImpl::StartWatchOnFileThread,
110 base::Unretained(this), path, 110 base::Unretained(this), path,
111 google_apis::CreateRelayCallback(on_start_callback), 111 google_apis::CreateRelayCallback(on_start_callback),
112 google_apis::CreateRelayCallback(on_write_callback))); 112 google_apis::CreateRelayCallback(on_write_callback)));
113 } 113 }
114 114
115 FileWriteWatcher::FileWriteWatcherImpl::~FileWriteWatcherImpl() { 115 FileWriteWatcher::FileWriteWatcherImpl::~FileWriteWatcherImpl() {
116 DCHECK(file_task_runner_->BelongsToCurrentThread()); 116 DCHECK(file_task_runner_->BelongsToCurrentThread());
117 117
118 STLDeleteContainerPairSecondPointers(watchers_.begin(), watchers_.end()); 118 base::STLDeleteContainerPairSecondPointers(watchers_.begin(),
119 watchers_.end());
119 } 120 }
120 121
121 void FileWriteWatcher::FileWriteWatcherImpl::DestroyOnFileThread() { 122 void FileWriteWatcher::FileWriteWatcherImpl::DestroyOnFileThread() {
122 DCHECK(file_task_runner_->BelongsToCurrentThread()); 123 DCHECK(file_task_runner_->BelongsToCurrentThread());
123 124
124 delete this; 125 delete this;
125 } 126 }
126 127
127 void FileWriteWatcher::FileWriteWatcherImpl::StartWatchOnFileThread( 128 void FileWriteWatcher::FileWriteWatcherImpl::StartWatchOnFileThread(
128 const base::FilePath& path, 129 const base::FilePath& path,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 DCHECK(thread_checker_.CalledOnValidThread()); 203 DCHECK(thread_checker_.CalledOnValidThread());
203 watcher_impl_->StartWatch(file_path, on_start_callback, on_write_callback); 204 watcher_impl_->StartWatch(file_path, on_start_callback, on_write_callback);
204 } 205 }
205 206
206 void FileWriteWatcher::DisableDelayForTesting() { 207 void FileWriteWatcher::DisableDelayForTesting() {
207 watcher_impl_->set_delay(base::TimeDelta()); 208 watcher_impl_->set_delay(base::TimeDelta());
208 } 209 }
209 210
210 } // namespace internal 211 } // namespace internal
211 } // namespace drive 212 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/chromeos/directory_loader.cc ('k') | components/drive/service/fake_drive_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698