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

Unified Diff: chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
diff --git a/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc b/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
index f24a403ab7d3f9490451b72c9bf150e291a5018a..68bc752cd0c3e4de368cf5cbefe88761869c6821 100644
--- a/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
+++ b/chrome/browser/geolocation/geolocation_exceptions_table_model_unittest.cc
@@ -40,8 +40,8 @@ class GeolocationExceptionsTableModelTest : public RenderViewHostTestHarness {
}
void CreateAllowedSamples() {
- scoped_refptr<GeolocationContentSettingsMap> map =
- profile()->GetGeolocationContentSettingsMap();
+ scoped_refptr<GeolocationContentSettingsMap> map(
+ profile()->GetGeolocationContentSettingsMap());
map->SetContentSetting(kUrl0, kUrl0, CONTENT_SETTING_ALLOW);
map->SetContentSetting(kUrl0, kUrl1, CONTENT_SETTING_ALLOW);
map->SetContentSetting(kUrl0, kUrl2, CONTENT_SETTING_ALLOW);
@@ -57,8 +57,8 @@ class GeolocationExceptionsTableModelTest : public RenderViewHostTestHarness {
TEST_F(GeolocationExceptionsTableModelTest, CanRemoveException) {
EXPECT_EQ(0, model_->RowCount());
- scoped_refptr<GeolocationContentSettingsMap> map =
- profile()->GetGeolocationContentSettingsMap();
+ scoped_refptr<GeolocationContentSettingsMap> map(
+ profile()->GetGeolocationContentSettingsMap());
// Ensure a single entry can be removed.
map->SetContentSetting(kUrl0, kUrl0, CONTENT_SETTING_ALLOW);
@@ -86,8 +86,8 @@ TEST_F(GeolocationExceptionsTableModelTest, CanRemoveException) {
TEST_F(GeolocationExceptionsTableModelTest, RemoveExceptions) {
CreateAllowedSamples();
- scoped_refptr<GeolocationContentSettingsMap> map =
- profile()->GetGeolocationContentSettingsMap();
+ scoped_refptr<GeolocationContentSettingsMap> map(
+ profile()->GetGeolocationContentSettingsMap());
// Test removing parent exception.
GeolocationExceptionsTableModel::Rows rows;
@@ -113,8 +113,8 @@ TEST_F(GeolocationExceptionsTableModelTest, RemoveExceptions) {
TEST_F(GeolocationExceptionsTableModelTest, RemoveAll) {
CreateAllowedSamples();
- scoped_refptr<GeolocationContentSettingsMap> map =
- profile()->GetGeolocationContentSettingsMap();
+ scoped_refptr<GeolocationContentSettingsMap> map(
+ profile()->GetGeolocationContentSettingsMap());
model_->RemoveAll();
EXPECT_EQ(CONTENT_SETTING_ASK, map->GetContentSetting(kUrl0, kUrl0));
« no previous file with comments | « chrome/browser/geolocation/access_token_store_browsertest.cc ('k') | chrome/browser/host_content_settings_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698