Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: chrome/browser/tabs/tab_strip_model_unittest.cc

Issue 274040: More style nits. (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "chrome/browser/dom_ui/new_tab_ui.h" 9 #include "chrome/browser/dom_ui/new_tab_ui.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 void GoBack(TabContents* contents) { 105 void GoBack(TabContents* contents) {
106 controller().GoBack(); 106 controller().GoBack();
107 } 107 }
108 108
109 void GoForward(TabContents* contents) { 109 void GoForward(TabContents* contents) {
110 controller().GoForward(); 110 controller().GoForward();
111 } 111 }
112 112
113 void SwitchTabTo(TabContents* contents) { 113 void SwitchTabTo(TabContents* contents) {
114 //contents()->DidBecomeSelected(); 114 // contents()->DidBecomeSelected();
115 } 115 }
116 116
117 // Sets the id of the specified contents. 117 // Sets the id of the specified contents.
118 void SetID(TabContents* contents, int id) { 118 void SetID(TabContents* contents, int id) {
119 GetIDAccessor()->SetProperty(contents->property_bag(), id); 119 GetIDAccessor()->SetProperty(contents->property_bag(), id);
120 } 120 }
121 121
122 // Returns the id of the specified contents. 122 // Returns the id of the specified contents.
123 int GetID(TabContents* contents) { 123 int GetID(TabContents* contents) {
124 return *GetIDAccessor()->GetProperty(contents->property_bag()); 124 return *GetIDAccessor()->GetProperty(contents->property_bag());
(...skipping 18 matching lines...) Expand all
143 } 143 }
144 144
145 private: 145 private:
146 PropertyAccessor<int>* GetIDAccessor() { 146 PropertyAccessor<int>* GetIDAccessor() {
147 static PropertyAccessor<int> accessor; 147 static PropertyAccessor<int> accessor;
148 return &accessor; 148 return &accessor;
149 } 149 }
150 150
151 std::wstring test_dir_; 151 std::wstring test_dir_;
152 std::wstring profile_path_; 152 std::wstring profile_path_;
153 std::map<TabContents*,int> foo_; 153 std::map<TabContents*, int> foo_;
154 ProfileManager pm_; 154 ProfileManager pm_;
155 }; 155 };
156 156
157 class MockTabStripModelObserver : public TabStripModelObserver { 157 class MockTabStripModelObserver : public TabStripModelObserver {
158 public: 158 public:
159 MockTabStripModelObserver() : empty_(true) {} 159 MockTabStripModelObserver() : empty_(true) {}
160 ~MockTabStripModelObserver() { 160 ~MockTabStripModelObserver() {
161 STLDeleteContainerPointers(states_.begin(), states_.end()); 161 STLDeleteContainerPointers(states_.begin(), states_.end());
162 } 162 }
163 163
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 tabstrip.AppendTabContents(contents2, true); 1528 tabstrip.AppendTabContents(contents2, true);
1529 1529
1530 tabstrip.CloseTabContentsAt(1); 1530 tabstrip.CloseTabContentsAt(1);
1531 EXPECT_FALSE(contents1->process()->fast_shutdown_started()); 1531 EXPECT_FALSE(contents1->process()->fast_shutdown_started());
1532 EXPECT_EQ(1, tabstrip.count()); 1532 EXPECT_EQ(1, tabstrip.count());
1533 1533
1534 tabstrip.CloseAllTabs(); 1534 tabstrip.CloseAllTabs();
1535 EXPECT_TRUE(tabstrip.empty()); 1535 EXPECT_TRUE(tabstrip.empty());
1536 } 1536 }
1537 } 1537 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698