| 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/browsing_data/cookies_tree_model.h" | 5 #include "chrome/browser/browsing_data/cookies_tree_model.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 334 |
| 335 // Do not call on the root. | 335 // Do not call on the root. |
| 336 void DeleteStoredObjects(CookieTreeNode* node) { | 336 void DeleteStoredObjects(CookieTreeNode* node) { |
| 337 node->DeleteStoredObjects(); | 337 node->DeleteStoredObjects(); |
| 338 CookieTreeNode* parent_node = node->parent(); | 338 CookieTreeNode* parent_node = node->parent(); |
| 339 DCHECK(parent_node); | 339 DCHECK(parent_node); |
| 340 delete parent_node->GetModel()->Remove(parent_node, node); | 340 delete parent_node->GetModel()->Remove(parent_node, node); |
| 341 } | 341 } |
| 342 | 342 |
| 343 protected: | 343 protected: |
| 344 MessageLoop message_loop_; | 344 base::MessageLoop message_loop_; |
| 345 content::TestBrowserThread ui_thread_; | 345 content::TestBrowserThread ui_thread_; |
| 346 content::TestBrowserThread file_user_blocking_; | 346 content::TestBrowserThread file_user_blocking_; |
| 347 content::TestBrowserThread io_thread_; | 347 content::TestBrowserThread io_thread_; |
| 348 | 348 |
| 349 scoped_ptr<TestingProfile> profile_; | 349 scoped_ptr<TestingProfile> profile_; |
| 350 scoped_refptr<MockBrowsingDataCookieHelper> | 350 scoped_refptr<MockBrowsingDataCookieHelper> |
| 351 mock_browsing_data_cookie_helper_; | 351 mock_browsing_data_cookie_helper_; |
| 352 scoped_refptr<MockBrowsingDataDatabaseHelper> | 352 scoped_refptr<MockBrowsingDataDatabaseHelper> |
| 353 mock_browsing_data_database_helper_; | 353 mock_browsing_data_database_helper_; |
| 354 scoped_refptr<MockBrowsingDataLocalStorageHelper> | 354 scoped_refptr<MockBrowsingDataLocalStorageHelper> |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model)); | 1192 EXPECT_EQ("A,C", GetDisplayedCookies(&cookies_model)); |
| 1193 | 1193 |
| 1194 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3"))); | 1194 cookies_model.UpdateSearchResults(string16(ASCIIToUTF16("foo3"))); |
| 1195 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model)); | 1195 EXPECT_EQ("D", GetDisplayedCookies(&cookies_model)); |
| 1196 | 1196 |
| 1197 cookies_model.UpdateSearchResults(string16()); | 1197 cookies_model.UpdateSearchResults(string16()); |
| 1198 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model)); | 1198 EXPECT_EQ("A,B,C,D", GetDisplayedCookies(&cookies_model)); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 } // namespace | 1201 } // namespace |
| OLD | NEW |