OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/pending_extension_manager.h" | 5 #include "chrome/browser/extensions/pending_extension_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 for (iter = pending_extension_list_.begin(); | 66 for (iter = pending_extension_list_.begin(); |
67 iter != pending_extension_list_.end(); | 67 iter != pending_extension_list_.end(); |
68 ++iter) { | 68 ++iter) { |
69 if (id == iter->id()) | 69 if (id == iter->id()) |
70 return true; | 70 return true; |
71 } | 71 } |
72 | 72 |
73 return false; | 73 return false; |
74 } | 74 } |
75 | 75 |
| 76 bool PendingExtensionManager::HasPendingExtensions() const { |
| 77 return !pending_extension_list_.empty(); |
| 78 } |
| 79 |
76 bool PendingExtensionManager::HasPendingExtensionFromSync() const { | 80 bool PendingExtensionManager::HasPendingExtensionFromSync() const { |
77 PendingExtensionList::const_iterator iter; | 81 PendingExtensionList::const_iterator iter; |
78 for (iter = pending_extension_list_.begin(); | 82 for (iter = pending_extension_list_.begin(); |
79 iter != pending_extension_list_.end(); | 83 iter != pending_extension_list_.end(); |
80 ++iter) { | 84 ++iter) { |
81 if (iter->is_from_sync()) | 85 if (iter->is_from_sync()) |
82 return true; | 86 return true; |
83 } | 87 } |
84 | 88 |
85 return false; | 89 return false; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 255 |
252 return true; | 256 return true; |
253 } | 257 } |
254 | 258 |
255 void PendingExtensionManager::AddForTesting( | 259 void PendingExtensionManager::AddForTesting( |
256 const PendingExtensionInfo& pending_extension_info) { | 260 const PendingExtensionInfo& pending_extension_info) { |
257 pending_extension_list_.push_back(pending_extension_info); | 261 pending_extension_list_.push_back(pending_extension_info); |
258 } | 262 } |
259 | 263 |
260 } // namespace extensions | 264 } // namespace extensions |
OLD | NEW |