| OLD | NEW |
| 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/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "chrome/browser/bookmark_codec.h" | 6 #include "chrome/browser/bookmarks/bookmark_bar_model.h" |
| 7 #include "chrome/browser/bookmark_bar_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_codec.h" |
| 8 #include "chrome/common/chrome_constants.h" | 8 #include "chrome/common/chrome_constants.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
| 11 #include "chrome/views/tree_node_model.h" | 11 #include "chrome/views/tree_node_model.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 class BookmarkBarModelTest : public testing::Test, | 14 class BookmarkBarModelTest : public testing::Test, |
| 15 public BookmarkBarModelObserver { | 15 public BookmarkBarModelObserver { |
| 16 public: | 16 public: |
| 17 struct ObserverDetails { | 17 struct ObserverDetails { |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 bb_model_->SetURLStarred(url, std::wstring(), true); | 712 bb_model_->SetURLStarred(url, std::wstring(), true); |
| 713 | 713 |
| 714 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->AddPage( | 714 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->AddPage( |
| 715 url, NULL, 1, GURL(), PageTransition::TYPED, | 715 url, NULL, 1, GURL(), PageTransition::TYPED, |
| 716 HistoryService::RedirectList()); | 716 HistoryService::RedirectList()); |
| 717 | 717 |
| 718 // This won't actually delete the URL, rather it'll empty out the visits. | 718 // This won't actually delete the URL, rather it'll empty out the visits. |
| 719 // This triggers blocking on the BookmarkBarModel. | 719 // This triggers blocking on the BookmarkBarModel. |
| 720 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->DeleteURL(url); | 720 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->DeleteURL(url); |
| 721 } | 721 } |
| OLD | NEW |