OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extension_toolbar_model.h" | 5 #include "chrome/browser/extensions/extension_toolbar_model.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_prefs.h" | 7 #include "chrome/browser/extensions/extension_prefs.h" |
8 #include "chrome/browser/extensions/extensions_service.h" | 8 #include "chrome/browser/extensions/extensions_service.h" |
9 #include "chrome/browser/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
11 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/common/notification_service.h" | 12 #include "chrome/common/notification_service.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 | 14 |
15 ExtensionToolbarModel::ExtensionToolbarModel(ExtensionsService* service) | 15 ExtensionToolbarModel::ExtensionToolbarModel(ExtensionsService* service) |
16 : service_(service), | 16 : service_(service), |
17 prefs_(service->profile()->GetPrefs()), | 17 prefs_(service->profile()->GetPrefs()), |
18 extensions_initialized_(false) { | 18 extensions_initialized_(false) { |
19 DCHECK(service_); | 19 DCHECK(service_); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 int incognito_index = 0, i = 0; | 224 int incognito_index = 0, i = 0; |
225 for (ExtensionList::iterator iter = begin(); iter != end(); | 225 for (ExtensionList::iterator iter = begin(); iter != end(); |
226 ++iter, ++i) { | 226 ++iter, ++i) { |
227 if (original_index == i) | 227 if (original_index == i) |
228 break; | 228 break; |
229 if (service_->IsIncognitoEnabled(*iter)) | 229 if (service_->IsIncognitoEnabled(*iter)) |
230 ++incognito_index; | 230 ++incognito_index; |
231 } | 231 } |
232 return incognito_index; | 232 return incognito_index; |
233 } | 233 } |
OLD | NEW |