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/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profiles/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_); |
20 | 20 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 int incognito_index = 0, i = 0; | 248 int incognito_index = 0, i = 0; |
249 for (ExtensionList::iterator iter = begin(); iter != end(); | 249 for (ExtensionList::iterator iter = begin(); iter != end(); |
250 ++iter, ++i) { | 250 ++iter, ++i) { |
251 if (original_index == i) | 251 if (original_index == i) |
252 break; | 252 break; |
253 if (service_->IsIncognitoEnabled(*iter)) | 253 if (service_->IsIncognitoEnabled(*iter)) |
254 ++incognito_index; | 254 ++incognito_index; |
255 } | 255 } |
256 return incognito_index; | 256 return incognito_index; |
257 } | 257 } |
OLD | NEW |