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

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

Issue 591443002: Componentize permission_request_id.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months 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" 19 #include "chrome/browser/content_settings/host_content_settings_map.h"
20 #include "chrome/browser/content_settings/permission_request_id.h"
21 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 20 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
22 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" 21 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h"
23 #include "chrome/browser/infobars/infobar_service.h" 22 #include "chrome/browser/infobars/infobar_service.h"
24 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 23 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
25 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.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_registrar.h" 30 #include "content/public/browser/notification_registrar.h"
31 #include "content/public/browser/notification_service.h" 31 #include "content/public/browser/notification_service.h"
32 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.h"
33 #include "content/public/test/mock_render_process_host.h" 33 #include "content/public/test/mock_render_process_host.h"
34 #include "content/public/test/test_renderer_host.h" 34 #include "content/public/test/test_renderer_host.h"
35 #include "content/public/test/test_utils.h" 35 #include "content/public/test/test_utils.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // it is the embedder. 815 // it is the embedder.
816 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), 816 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(),
817 requesting_frame_0.GetOrigin(), 817 requesting_frame_0.GetOrigin(),
818 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 818 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
819 13); 819 13);
820 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), 820 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(),
821 requesting_frame_0.GetOrigin(), 821 requesting_frame_0.GetOrigin(),
822 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 822 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
823 11); 823 11);
824 } 824 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698