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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_unittest.cc

Issue 670953006: Componentize HostContentSettingsMap and content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win64 suppress warnings Created 6 years, 1 month 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) 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/geolocation/geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/geolocation_permission_context.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/synchronization/waitable_event.h" 15 #include "base/synchronization/waitable_event.h"
16 #include "base/test/simple_test_clock.h" 16 #include "base/test/simple_test_clock.h"
17 #include "base/time/clock.h" 17 #include "base/time/clock.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/content_settings/host_content_settings_map.h"
20 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 19 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
21 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" 20 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h"
22 #include "chrome/browser/infobars/infobar_service.h" 21 #include "chrome/browser/infobars/infobar_service.h"
23 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 22 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
24 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
24 #include "components/content_settings/core/browser/host_content_settings_map.h"
25 #include "components/content_settings/core/common/permission_request_id.h" 25 #include "components/content_settings/core/common/permission_request_id.h"
26 #include "components/infobars/core/confirm_infobar_delegate.h" 26 #include "components/infobars/core/confirm_infobar_delegate.h"
27 #include "components/infobars/core/infobar.h" 27 #include "components/infobars/core/infobar.h"
28 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
29 #include "content/public/browser/navigation_details.h" 29 #include "content/public/browser/navigation_details.h"
30 #include "content/public/browser/notification_observer.h" 30 #include "content/public/browser/notification_observer.h"
31 #include "content/public/browser/notification_registrar.h" 31 #include "content/public/browser/notification_registrar.h"
32 #include "content/public/browser/notification_service.h" 32 #include "content/public/browser/notification_service.h"
33 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
34 #include "content/public/test/mock_render_process_host.h" 34 #include "content/public/test/mock_render_process_host.h"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // it is the embedder. 775 // it is the embedder.
776 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), 776 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(),
777 requesting_frame_0.GetOrigin(), 777 requesting_frame_0.GetOrigin(),
778 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 778 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
779 13); 779 13);
780 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), 780 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(),
781 requesting_frame_0.GetOrigin(), 781 requesting_frame_0.GetOrigin(),
782 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 782 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
783 11); 783 11);
784 } 784 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698