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

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

Issue 11183018: Refactor ChromeGeolocationPermissionContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates from comments Created 8 years, 2 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 | Annotate | Revision Log
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 "base/synchronization/waitable_event.h" 5 #include "base/synchronization/waitable_event.h"
6 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h" 6 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h"
7 #include "chrome/browser/ui/tab_contents/test_tab_contents.h" 7 #include "chrome/browser/ui/tab_contents/test_tab_contents.h"
8 #include "chrome/test/base/testing_profile.h" 8 #include "chrome/test/base/testing_profile.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/test/mock_render_process_host.h" 10 #include "content/public/test/mock_render_process_host.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int render_view_id, 56 int render_view_id,
57 int bridge_id, 57 int bridge_id,
58 const GURL& requesting_frame, 58 const GURL& requesting_frame,
59 base::Callback<void(bool)> callback, 59 base::Callback<void(bool)> callback,
60 bool allowed); 60 bool allowed);
61 }; 61 };
62 62
63 ObservationCountingQueueController::ObservationCountingQueueController( 63 ObservationCountingQueueController::ObservationCountingQueueController(
64 Profile* profile) 64 Profile* profile)
65 : GeolocationInfoBarQueueController( 65 : GeolocationInfoBarQueueController(
66 base::Bind(&ObservationCountingQueueController::NotifyPermissionSet),
67 profile), 66 profile),
68 call_count_(0) { 67 call_count_(0) {
69 } 68 }
70 69
71 void ObservationCountingQueueController::Observe( 70 void ObservationCountingQueueController::Observe(
72 int type, 71 int type,
73 const content::NotificationSource& source, 72 const content::NotificationSource& source,
74 const content::NotificationDetails& details) { 73 const content::NotificationDetails& details) {
75 ++call_count_; 74 ++call_count_;
76 GeolocationInfoBarQueueController::Observe(type, source, details); 75 GeolocationInfoBarQueueController::Observe(type, source, details);
(...skipping 24 matching lines...) Expand all
101 ObservationCountingQueueController infobar_queue_controller(profile()); 100 ObservationCountingQueueController infobar_queue_controller(profile());
102 GURL url("http://www.example.com/geolocation"); 101 GURL url("http://www.example.com/geolocation");
103 base::Callback<void(bool)> callback; 102 base::Callback<void(bool)> callback;
104 infobar_queue_controller.CreateInfoBarRequest(ProcessId(), RenderId(), 1, 103 infobar_queue_controller.CreateInfoBarRequest(ProcessId(), RenderId(), 1,
105 url, url, callback); 104 url, url, callback);
106 infobar_queue_controller.CreateInfoBarRequest(ProcessId(), RenderId(), 2, 105 infobar_queue_controller.CreateInfoBarRequest(ProcessId(), RenderId(), 2,
107 url, url, callback); 106 url, url, callback);
108 infobar_queue_controller.CancelInfoBarRequest(ProcessId(), RenderId(), 1); 107 infobar_queue_controller.CancelInfoBarRequest(ProcessId(), RenderId(), 1);
109 EXPECT_EQ(1, infobar_queue_controller.call_count()); 108 EXPECT_EQ(1, infobar_queue_controller.call_count());
110 }; 109 };
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_infobar_queue_controller.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698