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

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

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 #if !BUILDFLAG(ANDROID_JAVA_UI) 310 #if !BUILDFLAG(ANDROID_JAVA_UI)
311 void GeolocationPermissionContextTests::SetupRequestManager( 311 void GeolocationPermissionContextTests::SetupRequestManager(
312 content::WebContents* web_contents) { 312 content::WebContents* web_contents) {
313 // Create PermissionRequestManager. 313 // Create PermissionRequestManager.
314 PermissionRequestManager::CreateForWebContents(web_contents); 314 PermissionRequestManager::CreateForWebContents(web_contents);
315 PermissionRequestManager* permission_request_manager = 315 PermissionRequestManager* permission_request_manager =
316 PermissionRequestManager::FromWebContents(web_contents); 316 PermissionRequestManager::FromWebContents(web_contents);
317 317
318 // Create a MockPermissionPromptFactory for the PermissionRequestManager. 318 // Create a MockPermissionPromptFactory for the PermissionRequestManager.
319 mock_permission_prompt_factories_.push_back(base::WrapUnique( 319 mock_permission_prompt_factories_.push_back(
320 new MockPermissionPromptFactory(permission_request_manager))); 320 base::MakeUnique<MockPermissionPromptFactory>(
321 permission_request_manager));
321 322
322 // Prepare the PermissionRequestManager to display a mock bubble. 323 // Prepare the PermissionRequestManager to display a mock bubble.
323 permission_request_manager->DisplayPendingRequests(); 324 permission_request_manager->DisplayPendingRequests();
324 } 325 }
325 326
326 size_t GeolocationPermissionContextTests::GetBubblesQueueSize( 327 size_t GeolocationPermissionContextTests::GetBubblesQueueSize(
327 PermissionRequestManager* manager) { 328 PermissionRequestManager* manager) {
328 return manager->requests_.size(); 329 return manager->requests_.size();
329 } 330 }
330 331
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 // it is the embedder. 1000 // it is the embedder.
1000 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), 1001 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(),
1001 requesting_frame_0.GetOrigin(), 1002 requesting_frame_0.GetOrigin(),
1002 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 1003 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
1003 13); 1004 13);
1004 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), 1005 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(),
1005 requesting_frame_0.GetOrigin(), 1006 requesting_frame_0.GetOrigin(),
1006 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 1007 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
1007 11); 1008 11);
1008 } 1009 }
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698