| 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/memory/tab_manager_delegate_chromeos.h" | 5 #include "chrome/browser/memory/tab_manager_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 bool ResetIfIsArcApp() { | 196 bool ResetIfIsArcApp() { |
| 197 base::AutoLock lock(lock_); | 197 base::AutoLock lock(lock_); |
| 198 if (data_ && data_->is_arc_app) { | 198 if (data_ && data_->is_arc_app) { |
| 199 data_.reset(); | 199 data_.reset(); |
| 200 return true; | 200 return true; |
| 201 } | 201 } |
| 202 return false; | 202 return false; |
| 203 } | 203 } |
| 204 | 204 |
| 205 private: | 205 private: |
| 206 scoped_ptr<Data> data_; | 206 std::unique_ptr<Data> data_; |
| 207 // Protects rw access to data_; | 207 // Protects rw access to data_; |
| 208 base::Lock lock_; | 208 base::Lock lock_; |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 | 211 |
| 212 TabManagerDelegate::TabManagerDelegate( | 212 TabManagerDelegate::TabManagerDelegate( |
| 213 const base::WeakPtr<TabManager>& tab_manager) | 213 const base::WeakPtr<TabManager>& tab_manager) |
| 214 : tab_manager_(tab_manager), | 214 : tab_manager_(tab_manager), |
| 215 focused_process_(new FocusedProcess()), | 215 focused_process_(new FocusedProcess()), |
| 216 arc_process_instance_(nullptr), | 216 arc_process_instance_(nullptr), |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 663 } |
| 664 } | 664 } |
| 665 priority += priority_increment; | 665 priority += priority_increment; |
| 666 } | 666 } |
| 667 | 667 |
| 668 if (oom_score_for_tabs.size()) | 668 if (oom_score_for_tabs.size()) |
| 669 SetOomScoreAdjForTabs(oom_score_for_tabs); | 669 SetOomScoreAdjForTabs(oom_score_for_tabs); |
| 670 } | 670 } |
| 671 | 671 |
| 672 } // namespace memory | 672 } // namespace memory |
| OLD | NEW |