| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/views/bookmarks/bookmark_bar_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/prefs/pref_service.h" | |
| 10 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/values.h" | 10 #include "base/values.h" |
| 12 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 12 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 16 #include "chrome/browser/ui/app_list/app_list_util.h" | 15 #include "chrome/browser/ui/app_list/app_list_util.h" |
| 17 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_test_helper.h" | 16 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_test_helper.h" |
| 18 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 19 #include "chrome/test/base/browser_with_test_window_test.h" | 18 #include "chrome/test/base/browser_with_test_window_test.h" |
| 20 #include "chrome/test/base/scoped_testing_local_state.h" | 19 #include "chrome/test/base/scoped_testing_local_state.h" |
| 21 #include "chrome/test/base/testing_browser_process.h" | 20 #include "chrome/test/base/testing_browser_process.h" |
| 22 #include "components/bookmarks/browser/bookmark_model.h" | 21 #include "components/bookmarks/browser/bookmark_model.h" |
| 23 #include "components/bookmarks/common/bookmark_pref_names.h" | 22 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 24 #include "components/bookmarks/test/bookmark_test_helpers.h" | 23 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 24 #include "components/prefs/pref_service.h" |
| 25 #include "components/search_engines/search_terms_data.h" | 25 #include "components/search_engines/search_terms_data.h" |
| 26 #include "components/search_engines/template_url_service.h" | 26 #include "components/search_engines/template_url_service.h" |
| 27 #include "components/search_engines/template_url_service_client.h" | 27 #include "components/search_engines/template_url_service_client.h" |
| 28 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 28 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
| 29 #include "ui/views/controls/button/label_button.h" | 29 #include "ui/views/controls/button/label_button.h" |
| 30 #include "ui/views/controls/button/menu_button.h" | 30 #include "ui/views/controls/button/menu_button.h" |
| 31 | 31 |
| 32 using bookmarks::BookmarkModel; | 32 using bookmarks::BookmarkModel; |
| 33 using bookmarks::BookmarkNode; | 33 using bookmarks::BookmarkNode; |
| 34 | 34 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar, | 345 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar, |
| 346 new base::FundamentalValue(false)); | 346 new base::FundamentalValue(false)); |
| 347 EXPECT_FALSE(test_helper_->apps_page_shortcut()->visible()); | 347 EXPECT_FALSE(test_helper_->apps_page_shortcut()->visible()); |
| 348 | 348 |
| 349 // And try showing it via policy too. | 349 // And try showing it via policy too. |
| 350 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar, | 350 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar, |
| 351 new base::FundamentalValue(true)); | 351 new base::FundamentalValue(true)); |
| 352 EXPECT_TRUE(test_helper_->apps_page_shortcut()->visible()); | 352 EXPECT_TRUE(test_helper_->apps_page_shortcut()->visible()); |
| 353 } | 353 } |
| 354 #endif | 354 #endif |
| OLD | NEW |