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

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

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more Created 3 years, 10 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 ChromeRenderViewHostTestHarness::SetUp(); 281 ChromeRenderViewHostTestHarness::SetUp();
282 282
283 // Set up required helpers, and make this be as "tabby" as the code requires. 283 // Set up required helpers, and make this be as "tabby" as the code requires.
284 #if BUILDFLAG(ENABLE_EXTENSIONS) 284 #if BUILDFLAG(ENABLE_EXTENSIONS)
285 extensions::SetViewType(web_contents(), extensions::VIEW_TYPE_TAB_CONTENTS); 285 extensions::SetViewType(web_contents(), extensions::VIEW_TYPE_TAB_CONTENTS);
286 #endif 286 #endif
287 InfoBarService::CreateForWebContents(web_contents()); 287 InfoBarService::CreateForWebContents(web_contents());
288 TabSpecificContentSettings::CreateForWebContents(web_contents()); 288 TabSpecificContentSettings::CreateForWebContents(web_contents());
289 geolocation_permission_context_ = static_cast<GeolocationPermissionContext*>( 289 geolocation_permission_context_ = static_cast<GeolocationPermissionContext*>(
290 PermissionManager::Get(profile())->GetPermissionContext( 290 PermissionManager::Get(profile())->GetPermissionContext(
291 content::PermissionType::GEOLOCATION)); 291 CONTENT_SETTINGS_TYPE_GEOLOCATION));
292 #if defined(OS_ANDROID) 292 #if defined(OS_ANDROID)
293 static_cast<GeolocationPermissionContextAndroid*>( 293 static_cast<GeolocationPermissionContextAndroid*>(
294 geolocation_permission_context_) 294 geolocation_permission_context_)
295 ->SetLocationSettingsForTesting( 295 ->SetLocationSettingsForTesting(
296 std::unique_ptr<LocationSettings>(new MockLocationSettings())); 296 std::unique_ptr<LocationSettings>(new MockLocationSettings()));
297 MockLocationSettings::SetLocationStatus(true, true); 297 MockLocationSettings::SetLocationStatus(true, true);
298 #else 298 #else
299 SetupRequestManager(web_contents()); 299 SetupRequestManager(web_contents());
300 #endif 300 #endif
301 } 301 }
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 // it is the embedder. 1001 // it is the embedder.
1002 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(), 1002 EXPECT_EQ(map->GetLastUsage(requesting_frame_0.GetOrigin(),
1003 requesting_frame_0.GetOrigin(), 1003 requesting_frame_0.GetOrigin(),
1004 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 1004 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
1005 13); 1005 13);
1006 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(), 1006 EXPECT_EQ(map->GetLastUsage(requesting_frame_1.GetOrigin(),
1007 requesting_frame_0.GetOrigin(), 1007 requesting_frame_0.GetOrigin(),
1008 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(), 1008 CONTENT_SETTINGS_TYPE_GEOLOCATION).ToDoubleT(),
1009 11); 1009 11);
1010 } 1010 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698