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/ui/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/content_settings/content_settings_provider.h" | 11 #include "chrome/browser/content_settings/content_settings_provider.h" |
12 #include "chrome/browser/content_settings/content_settings_utils.h" | 12 #include "chrome/browser/content_settings/content_settings_utils.h" |
13 #include "chrome/browser/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.h" |
14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
15 #include "chrome/browser/infobars/infobar_delegate.h" | 15 #include "chrome/browser/infobars/infobar_delegate.h" |
16 #include "chrome/browser/infobars/infobar_service.h" | 16 #include "chrome/browser/infobars/infobar_service.h" |
17 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 17 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
18 #include "chrome/common/content_settings.h" | 18 #include "chrome/common/content_settings.h" |
19 #include "chrome/common/content_settings_types.h" | 19 #include "chrome/common/content_settings_types.h" |
20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_ALLOW); | 395 CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_ALLOW); |
396 website_settings()->OnUIClosing(); | 396 website_settings()->OnUIClosing(); |
397 EXPECT_EQ(1u, infobar_service()->infobar_count()); | 397 EXPECT_EQ(1u, infobar_service()->infobar_count()); |
398 | 398 |
399 // Removing an |InfoBarDelegate| from the |InfoBarService| does not delete | 399 // Removing an |InfoBarDelegate| from the |InfoBarService| does not delete |
400 // it. Hence the |delegate| must be cleaned up after it was removed from the | 400 // it. Hence the |delegate| must be cleaned up after it was removed from the |
401 // |infobar_service|. | 401 // |infobar_service|. |
402 scoped_ptr<InfoBarDelegate> delegate(infobar_service()->infobar_at(0)); | 402 scoped_ptr<InfoBarDelegate> delegate(infobar_service()->infobar_at(0)); |
403 infobar_service()->RemoveInfoBar(delegate.get()); | 403 infobar_service()->RemoveInfoBar(delegate.get()); |
404 } | 404 } |
OLD | NEW |