OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/data_usage/tab_id_provider.h" | 5 #include "chrome/browser/data_usage/tab_id_provider.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
15 #include "base/task_runner.h" | 16 #include "base/task_runner.h" |
16 #include "base/task_runner_util.h" | 17 #include "base/task_runner_util.h" |
17 | 18 |
18 namespace chrome_browser_data_usage { | 19 namespace chrome_browser_data_usage { |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 static_cast<void*>(&TabIdProvider::kUserDataKey); | 122 static_cast<void*>(&TabIdProvider::kUserDataKey); |
122 | 123 |
123 void TabIdProvider::OnTabIdReady(int32_t tab_id) { | 124 void TabIdProvider::OnTabIdReady(int32_t tab_id) { |
124 DCHECK(thread_checker_.CalledOnValidThread()); | 125 DCHECK(thread_checker_.CalledOnValidThread()); |
125 DCHECK(!is_tab_id_ready_); | 126 DCHECK(!is_tab_id_ready_); |
126 tab_id_ = tab_id; | 127 tab_id_ = tab_id; |
127 is_tab_id_ready_ = true; | 128 is_tab_id_ready_ = true; |
128 } | 129 } |
129 | 130 |
130 } // namespace chrome_browser_data_usage | 131 } // namespace chrome_browser_data_usage |
OLD | NEW |