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 #import "browser_actions_controller.h" | 5 #import "browser_actions_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 return selected_tab->restore_tab_helper()->session_id().id(); | 849 return selected_tab->restore_tab_helper()->session_id().id(); |
850 } | 850 } |
851 | 851 |
852 #pragma mark - | 852 #pragma mark - |
853 #pragma mark Testing Methods | 853 #pragma mark Testing Methods |
854 | 854 |
855 - (NSButton*)buttonWithIndex:(NSUInteger)index { | 855 - (NSButton*)buttonWithIndex:(NSUInteger)index { |
856 if (profile_->IsOffTheRecord()) | 856 if (profile_->IsOffTheRecord()) |
857 index = toolbarModel_->IncognitoIndexToOriginal(index); | 857 index = toolbarModel_->IncognitoIndexToOriginal(index); |
858 if (index < toolbarModel_->size()) { | 858 if (index < toolbarModel_->size()) { |
859 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); | 859 const Extension* extension = toolbarModel_->toolbar_item_by_index(index); |
860 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; | 860 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; |
861 } | 861 } |
862 return nil; | 862 return nil; |
863 } | 863 } |
864 | 864 |
865 @end | 865 @end |
OLD | NEW |