summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/feedback/feedback_util.cc2
-rw-r--r--chrome/browser/geolocation/access_token_store_browsertest.cc2
-rw-r--r--chrome/browser/google_apis/base_operations_server_unittest.cc2
-rw-r--r--chrome/browser/google_apis/drive_api_operations_unittest.cc2
-rw-r--r--chrome/browser/google_apis/gdata_wapi_operations_unittest.cc2
-rw-r--r--chrome/browser/history/history_backend.cc14
-rw-r--r--chrome/browser/history/history_backend_unittest.cc14
-rw-r--r--chrome/browser/history/history_browsertest.cc2
-rw-r--r--chrome/browser/history/history_service.cc30
-rw-r--r--chrome/browser/history/history_unittest.cc2
-rw-r--r--chrome/browser/history/in_memory_url_index.cc2
-rw-r--r--chrome/browser/history/in_memory_url_index_unittest.cc2
-rw-r--r--chrome/browser/history/top_sites_impl.cc14
-rw-r--r--chrome/browser/history/top_sites_impl_unittest.cc2
-rw-r--r--chrome/browser/history/top_sites_likely_impl.cc14
-rw-r--r--chrome/browser/history/top_sites_likely_impl_unittest.cc2
-rw-r--r--chrome/browser/history/typed_url_syncable_service_unittest.cc4
-rw-r--r--chrome/browser/history/url_index_private_data.cc2
-rw-r--r--chrome/browser/importer/importer_host.cc2
-rw-r--r--chrome/browser/importer/toolbar_importer.cc4
-rw-r--r--chrome/browser/io_thread.cc10
-rw-r--r--chrome/browser/managed_mode/managed_mode_unittest.cc8
-rw-r--r--chrome/browser/managed_mode/managed_user_service_unittest.cc2
-rw-r--r--chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc17
-rw-r--r--chrome/browser/media_galleries/fileapi/picasa/picasa_file_util_unittest.cc2
-rw-r--r--chrome/browser/media_galleries/media_file_system_registry.cc2
-rw-r--r--chrome/browser/media_galleries/media_galleries_test_util.cc2
-rw-r--r--chrome/browser/nacl_host/nacl_file_host.cc24
-rw-r--r--chrome/browser/net/chrome_network_delegate.cc6
-rw-r--r--chrome/browser/net/connection_tester.cc5
-rw-r--r--chrome/browser/net/connection_tester_unittest.cc4
-rw-r--r--chrome/browser/net/evicted_domain_cookie_counter.cc2
-rw-r--r--chrome/browser/net/network_stats.cc19
-rw-r--r--chrome/browser/net/predictor.cc7
-rw-r--r--chrome/browser/net/predictor_browsertest.cc2
-rw-r--r--chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc7
-rw-r--r--chrome/browser/net/sqlite_server_bound_cert_store.cc2
-rw-r--r--chrome/browser/net/ssl_config_service_manager_pref.cc2
-rw-r--r--chrome/browser/net/ssl_config_service_manager_pref_unittest.cc8
-rw-r--r--chrome/browser/notifications/notification_browsertest.cc2
-rw-r--r--chrome/browser/notifications/sync_notifier/synced_notification.cc4
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc32
-rw-r--r--chrome/browser/password_manager/password_manager_unittest.cc40
-rw-r--r--chrome/browser/password_manager/password_store.cc4
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc28
-rw-r--r--chrome/browser/password_manager/password_store_factory.cc4
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc30
-rw-r--r--chrome/browser/plugins/plugin_status_pref_setter.cc8
-rw-r--r--chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc4
-rw-r--r--chrome/browser/policy/cloud/device_management_service.cc2
-rw-r--r--chrome/browser/policy/cloud/external_policy_data_updater.cc8
-rw-r--r--chrome/browser/policy/managed_mode_policy_provider_unittest.cc7
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor.cc7
-rw-r--r--chrome/browser/predictors/resource_prefetch_predictor.cc6
-rw-r--r--chrome/browser/predictors/resource_prefetch_predictor_unittest.cc48
-rw-r--r--chrome/browser/predictors/resource_prefetcher.cc2
-rw-r--r--chrome/browser/prefs/chrome_pref_service_factory.cc6
-rw-r--r--chrome/browser/prefs/chrome_pref_service_unittest.cc2
-rw-r--r--chrome/browser/prefs/pref_service_syncable.cc17
-rw-r--r--chrome/browser/prefs/proxy_policy_unittest.cc4
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc2
-rw-r--r--chrome/browser/prerender/prerender_manager.cc21
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc9
-rw-r--r--chrome/browser/printing/print_job.cc8
-rw-r--r--chrome/browser/printing/print_job_manager.cc2
-rw-r--r--chrome/browser/printing/print_job_worker.cc4
-rw-r--r--chrome/browser/printing/print_view_manager.cc2
-rw-r--r--chrome/browser/profile_resetter/profile_resetter_unittest.cc2
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc4
-rw-r--r--chrome/browser/profiles/off_the_record_profile_io_data.cc8
-rw-r--r--chrome/browser/profiles/profile_impl.cc23
-rw-r--r--chrome/browser/profiles/profile_impl_io_data.cc41
-rw-r--r--chrome/browser/profiles/profile_io_data.cc20
-rw-r--r--chrome/browser/profiles/profile_manager_unittest.cc6
-rw-r--r--chrome/browser/profiles/startup_task_runner_service.cc2
76 files changed, 336 insertions, 336 deletions
diff --git a/chrome/browser/feedback/feedback_util.cc b/chrome/browser/feedback/feedback_util.cc
index 456d21f..319c91b 100644
--- a/chrome/browser/feedback/feedback_util.cc
+++ b/chrome/browser/feedback/feedback_util.cc
@@ -240,7 +240,7 @@ bool FeedbackUtil::ValidFeedbackSize(const std::string& content) {
// static
void FeedbackUtil::SendReport(scoped_refptr<FeedbackData> data) {
- if (!data) {
+ if (!data.get()) {
LOG(ERROR) << "FeedbackUtil::SendReport called with NULL data!";
NOTREACHED();
return;
diff --git a/chrome/browser/geolocation/access_token_store_browsertest.cc b/chrome/browser/geolocation/access_token_store_browsertest.cc
index 58fa159..de57be7 100644
--- a/chrome/browser/geolocation/access_token_store_browsertest.cc
+++ b/chrome/browser/geolocation/access_token_store_browsertest.cc
@@ -49,7 +49,7 @@ void StartTestStepFromClientThread(
scoped_refptr<AccessTokenStore>* store,
const AccessTokenStore::LoadAccessTokensCallbackType& callback) {
ASSERT_TRUE(BrowserThread::CurrentlyOn(kExpectedClientThreadId));
- if (*store == NULL)
+ if (store->get() == NULL)
(*store) = new ChromeAccessTokenStore();
(*store)->LoadAccessTokens(callback);
}
diff --git a/chrome/browser/google_apis/base_operations_server_unittest.cc b/chrome/browser/google_apis/base_operations_server_unittest.cc
index 29b50bb..784082a 100644
--- a/chrome/browser/google_apis/base_operations_server_unittest.cc
+++ b/chrome/browser/google_apis/base_operations_server_unittest.cc
@@ -50,7 +50,7 @@ class BaseOperationsServerTest : public testing::Test {
content::BrowserThread::IO));
operation_runner_.reset(new OperationRunner(profile_.get(),
- request_context_getter_,
+ request_context_getter_.get(),
std::vector<std::string>(),
kTestUserAgent));
operation_runner_->auth_service()->set_access_token_for_testing(
diff --git a/chrome/browser/google_apis/drive_api_operations_unittest.cc b/chrome/browser/google_apis/drive_api_operations_unittest.cc
index 4107645..72e27b2 100644
--- a/chrome/browser/google_apis/drive_api_operations_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_operations_unittest.cc
@@ -64,7 +64,7 @@ class DriveApiOperationsTest : public testing::Test {
content::BrowserThread::IO));
operation_runner_.reset(new OperationRunner(profile_.get(),
- request_context_getter_,
+ request_context_getter_.get(),
std::vector<std::string>(),
kTestUserAgent));
operation_runner_->auth_service()->set_access_token_for_testing(
diff --git a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
index 39a7a62..ec0df46 100644
--- a/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_operations_unittest.cc
@@ -58,7 +58,7 @@ class GDataWapiOperationsTest : public testing::Test {
content::BrowserThread::IO));
operation_runner_.reset(new OperationRunner(profile_.get(),
- request_context_getter_,
+ request_context_getter_.get(),
std::vector<std::string>(),
kTestUserAgent));
operation_runner_->auth_service()->set_access_token_for_testing(
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index cad3877a..a7cef8d 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -152,7 +152,7 @@ class CommitLaterTask : public base::RefCounted<CommitLaterTask> {
}
void RunCommit() {
- if (history_backend_)
+ if (history_backend_.get())
history_backend_->Commit();
}
@@ -273,7 +273,7 @@ HistoryBackend::HistoryBackend(const base::FilePath& history_dir,
}
HistoryBackend::~HistoryBackend() {
- DCHECK(!scheduled_commit_) << "Deleting without cleanup";
+ DCHECK(!scheduled_commit_.get()) << "Deleting without cleanup";
ReleaseDBTasks();
#if defined(OS_ANDROID)
@@ -2365,7 +2365,7 @@ bool HistoryBackend::ValidateSetFaviconsParams(
typedef std::map<GURL, size_t> BitmapsPerIconURL;
BitmapsPerIconURL num_bitmaps_per_icon_url;
for (size_t i = 0; i < favicon_bitmap_data.size(); ++i) {
- if (!favicon_bitmap_data[i].bitmap_data)
+ if (!favicon_bitmap_data[i].bitmap_data.get())
return false;
const GURL& icon_url = favicon_bitmap_data[i].icon_url;
@@ -2389,7 +2389,7 @@ bool HistoryBackend::ValidateSetFaviconsParams(
bool HistoryBackend::IsFaviconBitmapDataEqual(
FaviconBitmapID bitmap_id,
const scoped_refptr<base::RefCountedMemory>& new_bitmap_data) {
- if (!new_bitmap_data)
+ if (!new_bitmap_data.get())
return false;
scoped_refptr<base::RefCountedMemory> original_bitmap_data;
@@ -2648,7 +2648,7 @@ void HistoryBackend::Commit() {
}
void HistoryBackend::ScheduleCommit() {
- if (scheduled_commit_)
+ if (scheduled_commit_.get())
return;
scheduled_commit_ = new CommitLaterTask(this);
base::MessageLoop::current()->PostDelayedTask(
@@ -2658,7 +2658,7 @@ void HistoryBackend::ScheduleCommit() {
}
void HistoryBackend::CancelScheduledCommit() {
- if (scheduled_commit_) {
+ if (scheduled_commit_.get()) {
scheduled_commit_->Cancel();
scheduled_commit_ = NULL;
}
@@ -2870,7 +2870,7 @@ void HistoryBackend::KillHistoryDatabase() {
void HistoryBackend::ProcessDBTask(
scoped_refptr<HistoryDBTaskRequest> request) {
- DCHECK(request);
+ DCHECK(request.get());
if (request->canceled())
return;
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index a27edb4..09e57e9 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -387,7 +387,7 @@ class HistoryBackendTest : public testing::Test {
friend class HistoryBackendTestDelegate;
virtual void TearDown() {
- if (backend_)
+ if (backend_.get())
backend_->Closing();
backend_ = NULL;
mem_backend_.reset();
@@ -2347,7 +2347,7 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) {
base::Unretained(static_cast<HistoryBackendTest*>(this))));
HistoryBackendCancelableRequest cancellable_request;
cancellable_request.MockScheduleOfRequest<QueryFilteredURLsRequest>(
- request1);
+ request1.get());
VisitFilter filter;
// Time limit is |tested_time| +/- 45 min.
@@ -2370,7 +2370,7 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) {
base::Bind(&HistoryBackendTest::OnQueryFiltered,
base::Unretained(static_cast<HistoryBackendTest*>(this))));
cancellable_request.MockScheduleOfRequest<QueryFilteredURLsRequest>(
- request2);
+ request2.get());
filter.SetFilterTime(tested_time + one_hour);
filter.SetFilterWidth(one_hour);
backend_->QueryFilteredURLs(request2, 100, filter, false);
@@ -2386,7 +2386,7 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) {
base::Bind(&HistoryBackendTest::OnQueryFiltered,
base::Unretained(static_cast<HistoryBackendTest*>(this))));
cancellable_request.MockScheduleOfRequest<QueryFilteredURLsRequest>(
- request3);
+ request3.get());
filter.SetFilterTime(tested_time - one_hour);
filter.SetFilterWidth(one_hour);
backend_->QueryFilteredURLs(request3, 100, filter, false);
@@ -2407,7 +2407,7 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) {
base::Bind(&HistoryBackendTest::OnQueryFiltered,
base::Unretained(static_cast<HistoryBackendTest*>(this))));
cancellable_request.MockScheduleOfRequest<QueryFilteredURLsRequest>(
- request4);
+ request4.get());
filter.SetFilterTime(tested_time);
filter.SetDayOfTheWeekFilter(static_cast<int>(exploded_time.day_of_week));
backend_->QueryFilteredURLs(request4, 100, filter, false);
@@ -2423,7 +2423,7 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) {
base::Bind(&HistoryBackendTest::OnQueryFiltered,
base::Unretained(static_cast<HistoryBackendTest*>(this))));
cancellable_request.MockScheduleOfRequest<QueryFilteredURLsRequest>(
- request5);
+ request5.get());
filter.SetFilterTime(tested_time - base::TimeDelta::FromMinutes(40));
filter.SetFilterWidth(base::TimeDelta::FromMinutes(20));
backend_->QueryFilteredURLs(request5, 100, filter, false);
@@ -2438,7 +2438,7 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) {
base::Bind(&HistoryBackendTest::OnQueryFiltered,
base::Unretained(static_cast<HistoryBackendTest*>(this))));
cancellable_request.MockScheduleOfRequest<QueryFilteredURLsRequest>(
- request6);
+ request6.get());
filter.SetFilterTime(tested_time);
filter.SetFilterWidth(one_hour * 2);
backend_->QueryFilteredURLs(request6, 100, filter, true);
diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc
index d84de7f..a233ca2 100644
--- a/chrome/browser/history/history_browsertest.cc
+++ b/chrome/browser/history/history_browsertest.cc
@@ -91,7 +91,7 @@ class HistoryBrowserTest : public InProcessBrowserTest {
HistoryService* history =
HistoryServiceFactory::GetForProfile(GetProfile(),
Profile::EXPLICIT_ACCESS);
- history->HistoryService::ScheduleDBTask(task, &request_consumer);
+ history->HistoryService::ScheduleDBTask(task.get(), &request_consumer);
content::RunMessageLoop();
}
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index 6ef94f9..a2021b5 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -258,7 +258,7 @@ bool HistoryService::BackendLoaded() {
void HistoryService::UnloadBackend() {
DCHECK(thread_checker_.CalledOnValidThread());
- if (!history_backend_)
+ if (!history_backend_.get())
return; // Already unloaded.
// Get rid of the in-memory backend.
@@ -1063,7 +1063,7 @@ syncer::SyncError HistoryService::ProcessLocalDeleteDirective(
void HistoryService::SetInMemoryBackend(int backend_id,
history::InMemoryHistoryBackend* mem_backend) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
DVLOG(1) << "Message from obsolete backend";
// Cleaning up the memory backend.
delete mem_backend;
@@ -1079,7 +1079,7 @@ void HistoryService::SetInMemoryBackend(int backend_id,
void HistoryService::NotifyProfileError(int backend_id,
sql::InitStatus init_status) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
DVLOG(1) << "Message from obsolete backend";
return;
}
@@ -1109,13 +1109,15 @@ void HistoryService::ExpireHistoryBetween(
CancelableTaskTracker* tracker) {
DCHECK(thread_);
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(history_backend_);
- tracker->PostTaskAndReply(
- thread_->message_loop_proxy(),
- FROM_HERE,
- base::Bind(&HistoryBackend::ExpireHistoryBetween,
- history_backend_, restrict_urls, begin_time, end_time),
- callback);
+ DCHECK(history_backend_.get());
+ tracker->PostTaskAndReply(thread_->message_loop_proxy(),
+ FROM_HERE,
+ base::Bind(&HistoryBackend::ExpireHistoryBetween,
+ history_backend_,
+ restrict_urls,
+ begin_time,
+ end_time),
+ callback);
}
void HistoryService::ExpireHistory(
@@ -1124,7 +1126,7 @@ void HistoryService::ExpireHistory(
CancelableTaskTracker* tracker) {
DCHECK(thread_);
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(history_backend_);
+ DCHECK(history_backend_.get());
tracker->PostTaskAndReply(
thread_->message_loop_proxy(),
FROM_HERE,
@@ -1191,7 +1193,7 @@ void HistoryService::BroadcastNotificationsHelper(
void HistoryService::LoadBackendIfNecessary() {
DCHECK(thread_checker_.CalledOnValidThread());
- if (!thread_ || history_backend_)
+ if (!thread_ || history_backend_.get())
return; // Failed to init, or already started loading.
++current_backend_id_;
@@ -1216,7 +1218,7 @@ void HistoryService::LoadBackendIfNecessary() {
void HistoryService::OnDBLoaded(int backend_id) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
DVLOG(1) << "Message from obsolete backend";
return;
}
@@ -1241,7 +1243,7 @@ bool HistoryService::GetRowForURL(const GURL& url, history::URLRow* url_row) {
void HistoryService::StartTopSitesMigration(int backend_id) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
DVLOG(1) << "Message from obsolete backend";
return;
}
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 423b38f..4c5be04 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -145,7 +145,7 @@ class HistoryBackendDBTest : public HistoryUnitTestBase {
}
void DeleteBackend() {
- if (backend_) {
+ if (backend_.get()) {
backend_->Closing();
backend_ = NULL;
}
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index f53eb10..0207af2 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -73,7 +73,7 @@ bool InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask::RunOnDBThread(
data_ = URLIndexPrivateData::RebuildFromHistory(db, languages_,
scheme_whitelist_);
succeeded_ = data_.get() && !data_->Empty();
- if (!succeeded_ && data_)
+ if (!succeeded_ && data_.get())
data_->Clear();
return true;
}
diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc
index 2e0b258..4a573bf 100644
--- a/chrome/browser/history/in_memory_url_index_unittest.cc
+++ b/chrome/browser/history/in_memory_url_index_unittest.cc
@@ -1052,7 +1052,7 @@ TEST_F(InMemoryURLIndexTest, CacheSaveRestore) {
EXPECT_GT(new_data.restored_cache_version_, 0);
// Compare the captured and restored for equality.
- ExpectPrivateDataEqual(*old_data, new_data);
+ ExpectPrivateDataEqual(*old_data.get(), new_data);
}
class InMemoryURLIndexCacheTest : public testing::Test {
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc
index 9915d03..bc6e110 100644
--- a/chrome/browser/history/top_sites_impl.cc
+++ b/chrome/browser/history/top_sites_impl.cc
@@ -226,11 +226,11 @@ bool TopSitesImpl::SetPageThumbnail(const GURL& url,
// Always remove the existing entry and then add it back. That way if we end
// up with too many temp thumbnails we'll prune the oldest first.
RemoveTemporaryThumbnailByURL(url);
- AddTemporaryThumbnail(url, thumbnail_data, score);
+ AddTemporaryThumbnail(url, thumbnail_data.get(), score);
return true;
}
- return SetPageThumbnailEncoded(url, thumbnail_data, score);
+ return SetPageThumbnailEncoded(url, thumbnail_data.get(), score);
}
bool TopSitesImpl::SetPageThumbnailToJPEGBytes(
@@ -369,9 +369,8 @@ void TopSitesImpl::FinishHistoryMigration(const ThumbnailMigration& data) {
URLToThumbnailMap::const_iterator image_i =
data.url_to_thumbnail_map.find(data.most_visited[i].url);
if (image_i != data.url_to_thumbnail_map.end()) {
- SetPageThumbnailEncoded(data.most_visited[i].url,
- image_i->second,
- ThumbnailScore());
+ SetPageThumbnailEncoded(
+ data.most_visited[i].url, image_i->second.get(), ThumbnailScore());
}
}
@@ -793,9 +792,8 @@ void TopSitesImpl::SetTopSites(const MostVisitedURLList& new_top_sites) {
for (TempImages::iterator it = temp_images_.begin();
it != temp_images_.end(); ++it) {
if (canonical_url == cache_->GetCanonicalURL(it->first)) {
- SetPageThumbnailEncoded(mv.url,
- it->second.thumbnail,
- it->second.thumbnail_score);
+ SetPageThumbnailEncoded(
+ mv.url, it->second.thumbnail.get(), it->second.thumbnail_score);
temp_images_.erase(it);
break;
}
diff --git a/chrome/browser/history/top_sites_impl_unittest.cc b/chrome/browser/history/top_sites_impl_unittest.cc
index d9bbb80..1e58ab0 100644
--- a/chrome/browser/history/top_sites_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_impl_unittest.cc
@@ -285,7 +285,7 @@ class TopSitesImplTest : public HistoryUnitTestBase {
base::RefCountedMemory* bytes) {
scoped_refptr<base::RefCountedBytes> encoded_image;
TopSitesImpl::EncodeBitmap(image, &encoded_image);
- return ThumbnailsAreEqual(encoded_image, bytes);
+ return ThumbnailsAreEqual(encoded_image.get(), bytes);
}
// Recreates top sites. This forces top sites to reread from the db.
diff --git a/chrome/browser/history/top_sites_likely_impl.cc b/chrome/browser/history/top_sites_likely_impl.cc
index 1215ac5..7bba06c 100644
--- a/chrome/browser/history/top_sites_likely_impl.cc
+++ b/chrome/browser/history/top_sites_likely_impl.cc
@@ -226,11 +226,11 @@ bool TopSitesLikelyImpl::SetPageThumbnail(const GURL& url,
// Always remove the existing entry and then add it back. That way if we end
// up with too many temp thumbnails we'll prune the oldest first.
RemoveTemporaryThumbnailByURL(url);
- AddTemporaryThumbnail(url, thumbnail_data, score);
+ AddTemporaryThumbnail(url, thumbnail_data.get(), score);
return true;
}
- return SetPageThumbnailEncoded(url, thumbnail_data, score);
+ return SetPageThumbnailEncoded(url, thumbnail_data.get(), score);
}
bool TopSitesLikelyImpl::SetPageThumbnailToJPEGBytes(
@@ -370,9 +370,8 @@ void TopSitesLikelyImpl::FinishHistoryMigration(
URLToThumbnailMap::const_iterator image_i =
data.url_to_thumbnail_map.find(data.most_visited[i].url);
if (image_i != data.url_to_thumbnail_map.end()) {
- SetPageThumbnailEncoded(data.most_visited[i].url,
- image_i->second,
- ThumbnailScore());
+ SetPageThumbnailEncoded(
+ data.most_visited[i].url, image_i->second.get(), ThumbnailScore());
}
}
@@ -796,9 +795,8 @@ void TopSitesLikelyImpl::SetTopSites(const MostVisitedURLList& new_top_sites) {
for (TempImages::iterator it = temp_images_.begin();
it != temp_images_.end(); ++it) {
if (canonical_url == cache_->GetCanonicalURL(it->first)) {
- SetPageThumbnailEncoded(mv.url,
- it->second.thumbnail,
- it->second.thumbnail_score);
+ SetPageThumbnailEncoded(
+ mv.url, it->second.thumbnail.get(), it->second.thumbnail_score);
temp_images_.erase(it);
break;
}
diff --git a/chrome/browser/history/top_sites_likely_impl_unittest.cc b/chrome/browser/history/top_sites_likely_impl_unittest.cc
index 1901b7e..377e04b 100644
--- a/chrome/browser/history/top_sites_likely_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_likely_impl_unittest.cc
@@ -286,7 +286,7 @@ class TopSitesLikelyImplTest : public HistoryUnitTestBase {
base::RefCountedMemory* bytes) {
scoped_refptr<base::RefCountedBytes> encoded_image;
TopSitesLikelyImpl::EncodeBitmap(image, &encoded_image);
- return ThumbnailsAreEqual(encoded_image, bytes);
+ return ThumbnailsAreEqual(encoded_image.get(), bytes);
}
// Recreates top sites. This forces top sites to reread from the db.
diff --git a/chrome/browser/history/typed_url_syncable_service_unittest.cc b/chrome/browser/history/typed_url_syncable_service_unittest.cc
index b3e3bbf..149ec4b 100644
--- a/chrome/browser/history/typed_url_syncable_service_unittest.cc
+++ b/chrome/browser/history/typed_url_syncable_service_unittest.cc
@@ -158,8 +158,8 @@ class TypedUrlSyncableServiceTest : public testing::Test {
virtual void SetUp() OVERRIDE {
fake_history_backend_ = new TestHistoryBackend();
- typed_url_sync_service_.reset(new TypedUrlSyncableService(
- fake_history_backend_));
+ typed_url_sync_service_.reset(
+ new TypedUrlSyncableService(fake_history_backend_.get()));
fake_change_processor_.reset(new TestChangeProcessor);
}
diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc
index e54fa77..8af97fa 100644
--- a/chrome/browser/history/url_index_private_data.cc
+++ b/chrome/browser/history/url_index_private_data.cc
@@ -464,7 +464,7 @@ scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RebuildFromHistory(
bool URLIndexPrivateData::WritePrivateDataToCacheFileTask(
scoped_refptr<URLIndexPrivateData> private_data,
const base::FilePath& file_path) {
- DCHECK(private_data);
+ DCHECK(private_data.get());
DCHECK(!file_path.empty());
return private_data->SaveToFile(file_path);
}
diff --git a/chrome/browser/importer/importer_host.cc b/chrome/browser/importer/importer_host.cc
index 0f89d0c..dde8a71 100644
--- a/chrome/browser/importer/importer_host.cc
+++ b/chrome/browser/importer/importer_host.cc
@@ -133,7 +133,7 @@ void ImporterHost::StartImportSettings(
writer_ = writer;
importer_ = importer::CreateImporterByType(source_profile.importer_type);
// If we fail to create the Importer, exit, as we cannot do anything.
- if (!importer_) {
+ if (!importer_.get()) {
NotifyImportEnded();
return;
}
diff --git a/chrome/browser/importer/toolbar_importer.cc b/chrome/browser/importer/toolbar_importer.cc
index b2da5bf..9f0596b0 100644
--- a/chrome/browser/importer/toolbar_importer.cc
+++ b/chrome/browser/importer/toolbar_importer.cc
@@ -75,7 +75,7 @@ void Toolbar5Importer::StartImport(
bridge_ = bridge;
items_to_import_ = items;
- DCHECK(source_profile.request_context_getter);
+ DCHECK(source_profile.request_context_getter.get());
request_context_getter_ = source_profile.request_context_getter;
state_ = INITIALIZED;
@@ -173,7 +173,7 @@ void Toolbar5Importer::EndImport() {
data_fetcher_ = NULL;
}
- if (bridge_)
+ if (bridge_.get())
bridge_->NotifyEnded();
}
}
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 2fe78ce..dc6c582 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -455,10 +455,10 @@ void IOThread::ChangedToOnTheRecord() {
net::URLRequestContextGetter* IOThread::system_url_request_context_getter() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!system_url_request_context_getter_) {
+ if (!system_url_request_context_getter_.get()) {
InitSystemRequestContext();
}
- return system_url_request_context_getter_;
+ return system_url_request_context_getter_.get();
}
void IOThread::Init() {
@@ -555,8 +555,8 @@ void IOThread::Init() {
scoped_refptr<net::HttpNetworkSession> network_session(
new net::HttpNetworkSession(session_params));
- globals_->proxy_script_fetcher_http_transaction_factory.reset(
- new net::HttpNetworkLayer(network_session));
+ globals_->proxy_script_fetcher_http_transaction_factory
+ .reset(new net::HttpNetworkLayer(network_session.get()));
scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl());
job_factory->SetProtocolHandler(chrome::kDataScheme,
@@ -887,7 +887,7 @@ void IOThread::ChangedToOnTheRecordOnIOThread() {
}
void IOThread::InitSystemRequestContext() {
- if (system_url_request_context_getter_)
+ if (system_url_request_context_getter_.get())
return;
// If we're in unit_tests, IOThread may not be run.
if (!BrowserThread::IsMessageLoopValid(BrowserThread::IO))
diff --git a/chrome/browser/managed_mode/managed_mode_unittest.cc b/chrome/browser/managed_mode/managed_mode_unittest.cc
index 4e26107..d1d0241 100644
--- a/chrome/browser/managed_mode/managed_mode_unittest.cc
+++ b/chrome/browser/managed_mode/managed_mode_unittest.cc
@@ -129,7 +129,7 @@ class ManagedModeTest : public ::testing::Test {
base::Callback<void(bool)> CreateExpectedCallback(bool success) {
scoped_refptr<MockCallback> callback = CreateCallback();
- EXPECT_CALL(*callback, DidEnterManagedMode(success));
+ EXPECT_CALL(*callback.get(), DidEnterManagedMode(success));
return base::Bind(&MockCallback::CheckManagedMode, callback);
}
@@ -178,7 +178,7 @@ TEST_F(ManagedModeTest, QueueRequests) {
&managed_mode_profile_,
base::Bind(&MockCallback::CheckManagedMode, callback));
// The callbacks should run as soon as |other_browser| is closed.
- EXPECT_CALL(*callback, DidEnterManagedMode(true)).Times(2);
+ EXPECT_CALL(*callback.get(), DidEnterManagedMode(true)).Times(2);
}
TEST_F(ManagedModeTest, OpenNewBrowser) {
@@ -197,7 +197,7 @@ TEST_F(ManagedModeTest, OpenNewBrowser) {
&managed_mode_profile_);
// Opening another browser should cancel entering managed mode.
- EXPECT_CALL(*callback, DidEnterManagedMode(false));
+ EXPECT_CALL(*callback.get(), DidEnterManagedMode(false));
BrowserFixture yet_another_browser(&managed_mode_, &other_profile_);
}
@@ -221,7 +221,7 @@ TEST_F(ManagedModeTest, DifferentProfile) {
// The first request should still succeed as soon as the other browser is
// closed.
- EXPECT_CALL(*callback, DidEnterManagedMode(true));
+ EXPECT_CALL(*callback.get(), DidEnterManagedMode(true));
}
TEST_F(ManagedModeTest, Cancelled) {
diff --git a/chrome/browser/managed_mode/managed_user_service_unittest.cc b/chrome/browser/managed_mode/managed_user_service_unittest.cc
index ce7b38e..02517aa 100644
--- a/chrome/browser/managed_mode/managed_user_service_unittest.cc
+++ b/chrome/browser/managed_mode/managed_user_service_unittest.cc
@@ -239,7 +239,7 @@ TEST_F(ManagedUserServiceExtensionTest, InstallContentPacks) {
extension_load_observer.details();
scoped_refptr<extensions::Extension> extension =
make_scoped_refptr(details.ptr());
- ASSERT_TRUE(extension);
+ ASSERT_TRUE(extension.get());
ScopedVector<ManagedModeSiteList> site_lists =
GetActiveSiteLists(managed_user_service);
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
index 333495d..012ddeb 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
@@ -128,15 +128,14 @@ class NativeMediaFileUtilTest : public testing::Test {
additional_providers.push_back(new MediaFileSystemMountPointProvider(
data_dir_.path()));
- file_system_context_ =
- new fileapi::FileSystemContext(
- fileapi::FileSystemTaskRunners::CreateMockTaskRunners(),
- fileapi::ExternalMountPoints::CreateRefCounted().get(),
- storage_policy,
- NULL,
- additional_providers.Pass(),
- data_dir_.path(),
- fileapi::CreateAllowFileAccessOptions());
+ file_system_context_ = new fileapi::FileSystemContext(
+ fileapi::FileSystemTaskRunners::CreateMockTaskRunners(),
+ fileapi::ExternalMountPoints::CreateRefCounted().get(),
+ storage_policy.get(),
+ NULL,
+ additional_providers.Pass(),
+ data_dir_.path(),
+ fileapi::CreateAllowFileAccessOptions());
file_util_ = file_system_context_->GetFileUtil(
fileapi::kFileSystemTypeNativeMedia);
diff --git a/chrome/browser/media_galleries/fileapi/picasa/picasa_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/picasa/picasa_file_util_unittest.cc
index bfa565f..0eb1c24 100644
--- a/chrome/browser/media_galleries/fileapi/picasa/picasa_file_util_unittest.cc
+++ b/chrome/browser/media_galleries/fileapi/picasa/picasa_file_util_unittest.cc
@@ -202,7 +202,7 @@ class PicasaFileUtilTest : public testing::Test {
file_system_context_ = new fileapi::FileSystemContext(
fileapi::FileSystemTaskRunners::CreateMockTaskRunners(),
fileapi::ExternalMountPoints::CreateRefCounted().get(),
- storage_policy,
+ storage_policy.get(),
NULL,
additional_providers.Pass(),
profile_dir_.path(),
diff --git a/chrome/browser/media_galleries/media_file_system_registry.cc b/chrome/browser/media_galleries/media_file_system_registry.cc
index d055cc5..324555f 100644
--- a/chrome/browser/media_galleries/media_file_system_registry.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry.cc
@@ -676,7 +676,7 @@ MediaFileSystemRegistry::GetOrCreateScopedMTPDeviceMapEntry(
base::Unretained(this),
device_location));
mtp_device_host->Init();
- mtp_device_delegate_map_[device_location] = mtp_device_host;
+ mtp_device_delegate_map_[device_location] = mtp_device_host.get();
return mtp_device_host;
}
diff --git a/chrome/browser/media_galleries/media_galleries_test_util.cc b/chrome/browser/media_galleries/media_galleries_test_util.cc
index 97afbf3..e08e15c 100644
--- a/chrome/browser/media_galleries/media_galleries_test_util.cc
+++ b/chrome/browser/media_galleries/media_galleries_test_util.cc
@@ -60,7 +60,7 @@ scoped_refptr<extensions::Extension> AddMediaGalleriesApp(
syncer::StringOrdinal::CreateInitialOrdinal());
ExtensionService* extension_service =
extensions::ExtensionSystem::Get(profile)->extension_service();
- extension_service->AddExtension(extension);
+ extension_service->AddExtension(extension.get());
extension_service->EnableExtension(extension->id());
return extension;
diff --git a/chrome/browser/nacl_host/nacl_file_host.cc b/chrome/browser/nacl_host/nacl_file_host.cc
index 16015ca..9ec7890 100644
--- a/chrome/browser/nacl_host/nacl_file_host.cc
+++ b/chrome/browser/nacl_host/nacl_file_host.cc
@@ -64,13 +64,13 @@ void DoOpenPnaclFile(
// Do some validation.
if (!nacl_file_host::PnaclCanOpenFile(filename, &full_filepath)) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
base::PlatformFile file_to_open;
if (!PnaclDoOpenFile(full_filepath, &file_to_open)) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
@@ -81,7 +81,7 @@ void DoOpenPnaclFile(
chrome_render_message_filter->peer_handle(),
true /* Close source */);
if (target_desc == IPC::InvalidPlatformFileForTransit()) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
ChromeViewHostMsg_GetReadonlyPnaclFD::WriteReplyParams(
@@ -96,7 +96,7 @@ void DoCreateTemporaryFile(
base::FilePath file_path;
if (!file_util::CreateTemporaryFile(&file_path)) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
@@ -109,7 +109,7 @@ void DoCreateTemporaryFile(
NULL, &error);
if (error != base::PLATFORM_FILE_OK) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
@@ -120,7 +120,7 @@ void DoCreateTemporaryFile(
chrome_render_message_filter->peer_handle(),
true);
if (target_desc == IPC::InvalidPlatformFileForTransit()) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
@@ -214,7 +214,7 @@ void DoOpenNaClExecutableOnThreadPool(
base::FilePath file_path;
if (!GetExtensionFilePath(extension_info_map, file_url, &file_path)) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
@@ -230,7 +230,7 @@ void DoOpenNaClExecutableOnThreadPool(
chrome_render_message_filter,
file, file_path, reply_msg));
} else {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
}
@@ -249,7 +249,7 @@ void GetReadonlyPnaclFd(
chrome_render_message_filter,
filename,
reply_msg))) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
}
}
@@ -294,7 +294,7 @@ void CreateTemporaryFile(
base::Bind(&DoCreateTemporaryFile,
chrome_render_message_filter,
reply_msg))) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
}
}
@@ -328,7 +328,7 @@ void OpenNaClExecutable(
if (!content::SiteInstance::IsSameWebSite(site_instance->GetBrowserContext(),
site_instance->GetSiteURL(),
file_url)) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
return;
}
@@ -342,7 +342,7 @@ void OpenNaClExecutable(
chrome_render_message_filter,
extension_info_map,
file_url, reply_msg))) {
- NotifyRendererOfError(chrome_render_message_filter, reply_msg);
+ NotifyRendererOfError(chrome_render_message_filter.get(), reply_msg);
}
}
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 64cbc00..fad14af 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -623,7 +623,7 @@ bool ChromeNetworkDelegate::OnCanGetCookies(
const net::URLRequest& request,
const net::CookieList& cookie_list) {
// NULL during tests, or when we're running in the system context.
- if (!cookie_settings_)
+ if (!cookie_settings_.get())
return true;
bool allow = cookie_settings_->IsReadingCookieAllowed(
@@ -648,7 +648,7 @@ bool ChromeNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
const std::string& cookie_line,
net::CookieOptions* options) {
// NULL during tests, or when we're running in the system context.
- if (!cookie_settings_)
+ if (!cookie_settings_.get())
return true;
bool allow = cookie_settings_->IsSettingCookieAllowed(
@@ -738,7 +738,7 @@ bool ChromeNetworkDelegate::OnCanEnablePrivacyMode(
const GURL& url,
const GURL& first_party_for_cookies) const {
// NULL during tests, or when we're running in the system context.
- if (!cookie_settings_)
+ if (!cookie_settings_.get())
return false;
bool reading_cookie_allowed = cookie_settings_->IsReadingCookieAllowed(
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc
index 4a7d56e..0bbcb10 100644
--- a/chrome/browser/net/connection_tester.cc
+++ b/chrome/browser/net/connection_tester.cc
@@ -124,8 +124,7 @@ class ExperimentURLRequestContext : public net::URLRequestContext {
scoped_refptr<net::HttpNetworkSession> network_session(
new net::HttpNetworkSession(session_params));
storage_.set_http_transaction_factory(new net::HttpCache(
- network_session,
- net::HttpCache::DefaultBackend::InMemory(0)));
+ network_session.get(), net::HttpCache::DefaultBackend::InMemory(0)));
// In-memory cookie store.
storage_.set_cookie_store(new net::CookieMonster(NULL, NULL));
@@ -369,7 +368,7 @@ void ConnectionTester::TestRunner::ReadBody(net::URLRequest* request) {
scoped_refptr<net::IOBuffer> unused_buffer(
new net::IOBuffer(kReadBufferSize));
int num_bytes;
- if (request->Read(unused_buffer, kReadBufferSize, &num_bytes)) {
+ if (request->Read(unused_buffer.get(), kReadBufferSize, &num_bytes)) {
OnReadCompleted(request, num_bytes);
} else if (!request->status().is_io_pending()) {
// Read failed synchronously.
diff --git a/chrome/browser/net/connection_tester_unittest.cc b/chrome/browser/net/connection_tester_unittest.cc
index c386081..ac4fa23 100644
--- a/chrome/browser/net/connection_tester_unittest.cc
+++ b/chrome/browser/net/connection_tester_unittest.cc
@@ -130,13 +130,13 @@ class ConnectionTesterTest : public PlatformTest {
session_params.host_resolver = &host_resolver_;
session_params.cert_verifier = cert_verifier_.get();
session_params.http_auth_handler_factory = &http_auth_handler_factory_;
- session_params.ssl_config_service = ssl_config_service_;
+ session_params.ssl_config_service = ssl_config_service_.get();
session_params.proxy_service = proxy_service_.get();
session_params.http_server_properties = &http_server_properties_impl_;
scoped_refptr<net::HttpNetworkSession> network_session(
new net::HttpNetworkSession(session_params));
http_transaction_factory_.reset(
- new net::HttpNetworkLayer(network_session));
+ new net::HttpNetworkLayer(network_session.get()));
proxy_script_fetcher_context_->set_http_transaction_factory(
http_transaction_factory_.get());
// In-memory cookie store.
diff --git a/chrome/browser/net/evicted_domain_cookie_counter.cc b/chrome/browser/net/evicted_domain_cookie_counter.cc
index f0f1142..c9b244e 100644
--- a/chrome/browser/net/evicted_domain_cookie_counter.cc
+++ b/chrome/browser/net/evicted_domain_cookie_counter.cc
@@ -107,7 +107,7 @@ void EvictedDomainCookieCounter::OnCookieChanged(
ProcessNewCookie(key, cookie, current_time);
}
- if (next_cookie_monster_delegate_)
+ if (next_cookie_monster_delegate_.get())
next_cookie_monster_delegate_->OnCookieChanged(cookie, removed, cause);
}
diff --git a/chrome/browser/net/network_stats.cc b/chrome/browser/net/network_stats.cc
index 86a19f0..6637e9a 100644
--- a/chrome/browser/net/network_stats.cc
+++ b/chrome/browser/net/network_stats.cc
@@ -367,9 +367,10 @@ void NetworkStats::ReadData() {
// We release the read_buffer_ in the destructor if there is an error.
read_buffer_ = new net::IOBuffer(kMaxMessage);
- rv = socket_->Read(read_buffer_, kMaxMessage,
- base::Bind(&NetworkStats::OnReadComplete,
- base::Unretained(this)));
+ rv = socket_->Read(
+ read_buffer_.get(),
+ kMaxMessage,
+ base::Bind(&NetworkStats::OnReadComplete, base::Unretained(this)));
if (rv == net::ERR_IO_PENDING)
break;
@@ -386,8 +387,8 @@ int NetworkStats::SendData() {
// Send a new packet.
scoped_refptr<net::IOBufferWithSize> buffer(
new net::IOBufferWithSize(bytes_to_send_));
- GetEchoRequest(buffer);
- write_buffer_ = new net::DrainableIOBuffer(buffer, bytes_to_send_);
+ GetEchoRequest(buffer.get());
+ write_buffer_ = new net::DrainableIOBuffer(buffer.get(), bytes_to_send_);
// As soon as we write, a read could happen. Thus update all the book
// keeping data.
@@ -404,10 +405,10 @@ int NetworkStats::SendData() {
if (!socket_.get())
return net::ERR_UNEXPECTED;
- int rv = socket_->Write(write_buffer_,
- write_buffer_->BytesRemaining(),
- base::Bind(&NetworkStats::OnWriteComplete,
- base::Unretained(this)));
+ int rv = socket_->Write(
+ write_buffer_.get(),
+ write_buffer_->BytesRemaining(),
+ base::Bind(&NetworkStats::OnWriteComplete, base::Unretained(this)));
if (rv < 0)
return rv;
DidSendData(rv);
diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc
index b1a3f60..9afc374 100644
--- a/chrome/browser/net/predictor.cc
+++ b/chrome/browser/net/predictor.cc
@@ -849,8 +849,11 @@ void Predictor::PreconnectUrlOnIOThread(
GURL canonical_url(CanonicalizeUrl(url));
recent_preconnects_.SetRecentlySeen(canonical_url);
- PreconnectOnIOThread(url, first_party_for_cookies, motivation, count,
- url_request_context_getter_);
+ PreconnectOnIOThread(url,
+ first_party_for_cookies,
+ motivation,
+ count,
+ url_request_context_getter_.get());
}
void Predictor::RecordPreconnectNavigationStats(const GURL& url) {
diff --git a/chrome/browser/net/predictor_browsertest.cc b/chrome/browser/net/predictor_browsertest.cc
index 975ab56..11213185 100644
--- a/chrome/browser/net/predictor_browsertest.cc
+++ b/chrome/browser/net/predictor_browsertest.cc
@@ -104,7 +104,7 @@ class PredictorBrowserTest : public InProcessBrowserTest {
protected:
virtual void SetUp() OVERRIDE {
net::ScopedDefaultHostResolverProc scoped_host_resolver_proc(
- host_resolution_request_recorder_);
+ host_resolution_request_recorder_.get());
InProcessBrowserTest::SetUp();
}
diff --git a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
index 770c8a9..c117482 100644
--- a/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
+++ b/chrome/browser/net/pref_proxy_config_tracker_impl_unittest.cc
@@ -342,10 +342,9 @@ class PrefProxyConfigTrackerImplCommandLineTest
command_line_.AppendSwitch(name);
}
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
- pref_service_.reset(
- PrefServiceMockBuilder().WithCommandLine(
- &command_line_).Create(registry));
- Init(pref_service_.get(), registry);
+ pref_service_.reset(PrefServiceMockBuilder().WithCommandLine(&command_line_)
+ .Create(registry.get()));
+ Init(pref_service_.get(), registry.get());
}
private:
diff --git a/chrome/browser/net/sqlite_server_bound_cert_store.cc b/chrome/browser/net/sqlite_server_bound_cert_store.cc
index 4be0d70..0ba32a4 100644
--- a/chrome/browser/net/sqlite_server_bound_cert_store.cc
+++ b/chrome/browser/net/sqlite_server_bound_cert_store.cc
@@ -393,7 +393,7 @@ bool SQLiteServerBoundCertStore::Backend::EnsureDatabaseVersion() {
scoped_refptr<net::X509Certificate> cert(
net::X509Certificate::CreateFromBytes(
cert_from_db.data(), cert_from_db.size()));
- if (cert) {
+ if (cert.get()) {
if (cur_version == 2) {
update_expires_smt.Reset(true);
update_expires_smt.BindInt64(0,
diff --git a/chrome/browser/net/ssl_config_service_manager_pref.cc b/chrome/browser/net/ssl_config_service_manager_pref.cc
index baf541b..2f7e48a 100644
--- a/chrome/browser/net/ssl_config_service_manager_pref.cc
+++ b/chrome/browser/net/ssl_config_service_manager_pref.cc
@@ -243,7 +243,7 @@ void SSLConfigServiceManagerPref::RegisterPrefs(PrefRegistrySimple* registry) {
}
net::SSLConfigService* SSLConfigServiceManagerPref::Get() {
- return ssl_config_service_;
+ return ssl_config_service_.get();
}
void SSLConfigServiceManagerPref::OnPreferenceChanged(
diff --git a/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc b/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc
index fa29093..97d009d 100644
--- a/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc
+++ b/chrome/browser/net/ssl_config_service_manager_pref_unittest.cc
@@ -169,9 +169,9 @@ TEST_F(SSLConfigServiceManagerPrefTest, NoCommandLinePrefs) {
PrefServiceMockBuilder builder;
builder.WithUserPrefs(local_state_store.get());
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
- scoped_ptr<PrefService> local_state(builder.Create(registry));
+ scoped_ptr<PrefService> local_state(builder.Create(registry.get()));
- SSLConfigServiceManager::RegisterPrefs(registry);
+ SSLConfigServiceManager::RegisterPrefs(registry.get());
scoped_ptr<SSLConfigServiceManager> config_manager(
SSLConfigServiceManager::CreateDefaultManager(local_state.get()));
@@ -221,9 +221,9 @@ TEST_F(SSLConfigServiceManagerPrefTest, CommandLinePrefs) {
builder.WithUserPrefs(local_state_store.get());
builder.WithCommandLine(&command_line);
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
- scoped_ptr<PrefService> local_state(builder.Create(registry));
+ scoped_ptr<PrefService> local_state(builder.Create(registry.get()));
- SSLConfigServiceManager::RegisterPrefs(registry);
+ SSLConfigServiceManager::RegisterPrefs(registry.get());
scoped_ptr<SSLConfigServiceManager> config_manager(
SSLConfigServiceManager::CreateDefaultManager(local_state.get()));
diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
index 4a317965..b92b337 100644
--- a/chrome/browser/notifications/notification_browsertest.cc
+++ b/chrome/browser/notifications/notification_browsertest.cc
@@ -112,7 +112,7 @@ class MessageCenterChangeObserver
void OnMessageCenterChanged() {
notification_received_ = true;
- if (message_loop_runner_)
+ if (message_loop_runner_.get())
message_loop_runner_->Quit();
}
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification.cc b/chrome/browser/notifications/sync_notifier/synced_notification.cc
index 813846d..2dbec6a 100644
--- a/chrome/browser/notifications/sync_notifier/synced_notification.cc
+++ b/chrome/browser/notifications/sync_notifier/synced_notification.cc
@@ -151,7 +151,7 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
display_source,
replace_key,
&optional_fields,
- delegate);
+ delegate.get());
notification_manager->Add(ui_notification, profile);
} else {
@@ -163,7 +163,7 @@ void SyncedNotification::Show(NotificationUIManager* notification_manager,
WebKit::WebTextDirectionDefault,
display_source,
replace_key,
- delegate);
+ delegate.get());
notification_manager->Add(ui_notification, profile);
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
index 0da3455..f502a3c 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
@@ -250,31 +250,29 @@ void NativeBackendKWalletTest::SetUp() {
new dbus::MockObjectProxy(mock_session_bus_.get(),
"org.kde.klauncher",
dbus::ObjectPath("/KLauncher"));
- EXPECT_CALL(*mock_klauncher_proxy_,
- MockCallMethodAndBlock(_, _))
- .WillRepeatedly(Invoke(this,
- &NativeBackendKWalletTest::KLauncherMethodCall));
+ EXPECT_CALL(*mock_klauncher_proxy_.get(), MockCallMethodAndBlock(_, _))
+ .WillRepeatedly(
+ Invoke(this, &NativeBackendKWalletTest::KLauncherMethodCall));
mock_kwallet_proxy_ =
new dbus::MockObjectProxy(mock_session_bus_.get(),
"org.kde.kwalletd",
dbus::ObjectPath("/modules/kwalletd"));
- EXPECT_CALL(*mock_kwallet_proxy_,
- MockCallMethodAndBlock(_, _))
- .WillRepeatedly(Invoke(this,
- &NativeBackendKWalletTest::KWalletMethodCall));
-
- EXPECT_CALL(*mock_session_bus_, GetObjectProxy(
- "org.kde.klauncher",
- dbus::ObjectPath("/KLauncher")))
+ EXPECT_CALL(*mock_kwallet_proxy_.get(), MockCallMethodAndBlock(_, _))
+ .WillRepeatedly(
+ Invoke(this, &NativeBackendKWalletTest::KWalletMethodCall));
+
+ EXPECT_CALL(
+ *mock_session_bus_.get(),
+ GetObjectProxy("org.kde.klauncher", dbus::ObjectPath("/KLauncher")))
.WillRepeatedly(Return(mock_klauncher_proxy_.get()));
- EXPECT_CALL(*mock_session_bus_, GetObjectProxy(
- "org.kde.kwalletd",
- dbus::ObjectPath("/modules/kwalletd")))
+ EXPECT_CALL(
+ *mock_session_bus_.get(),
+ GetObjectProxy("org.kde.kwalletd", dbus::ObjectPath("/modules/kwalletd")))
.WillRepeatedly(Return(mock_kwallet_proxy_.get()));
- EXPECT_CALL(*mock_session_bus_,
- ShutdownAndBlock()).WillOnce(Return()).WillRepeatedly(Return());
+ EXPECT_CALL(*mock_session_bus_.get(), ShutdownAndBlock()).WillOnce(Return())
+ .WillRepeatedly(Return());
}
void NativeBackendKWalletTest::TearDown() {
diff --git a/chrome/browser/password_manager/password_manager_unittest.cc b/chrome/browser/password_manager/password_manager_unittest.cc
index dfdd956..8ce8e39 100644
--- a/chrome/browser/password_manager/password_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_manager_unittest.cc
@@ -117,7 +117,7 @@ TEST_F(PasswordManagerTest, FormSubmitEmptyStore) {
// Test that observing a newly submitted form shows the save password bar.
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -138,7 +138,7 @@ TEST_F(PasswordManagerTest, FormSubmitEmptyStore) {
manager()->OnPasswordFormsRendered(observed); // The post-navigation layout.
ASSERT_TRUE(form_to_save.get());
- EXPECT_CALL(*store_, AddLogin(FormMatches(form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
// Simulate saving the form, as if the info bar was accepted.
form_to_save->Save();
@@ -149,7 +149,7 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSubmitEmptyStore) {
// user generating the password through the browser.
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -166,7 +166,7 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSubmitEmptyStore) {
// navigation occurs.
EXPECT_CALL(delegate_,
AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, AddLogin(FormMatches(form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
// Now the password manager waits for the navigation to complete.
observed.clear();
@@ -183,7 +183,7 @@ TEST_F(PasswordManagerTest, FormSubmitNoGoodMatch) {
existing_different->username_value = ASCIIToUTF16("google2");
result.push_back(existing_different);
EXPECT_CALL(delegate_, FillPasswordForm(_));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
@@ -204,7 +204,7 @@ TEST_F(PasswordManagerTest, FormSubmitNoGoodMatch) {
manager()->OnPasswordFormsRendered(observed); // The post-navigation layout.
ASSERT_TRUE(form_to_save.get());
- EXPECT_CALL(*store_, AddLogin(FormMatches(form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
// Simulate saving the form.
form_to_save->Save();
@@ -213,7 +213,7 @@ TEST_F(PasswordManagerTest, FormSubmitNoGoodMatch) {
TEST_F(PasswordManagerTest, FormSeenThenLeftPage) {
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -241,7 +241,7 @@ TEST_F(PasswordManagerTest, FormSubmitAfterNavigateSubframe) {
// password infobar.
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -270,7 +270,7 @@ TEST_F(PasswordManagerTest, FormSubmitAfterNavigateSubframe) {
manager()->OnPasswordFormsRendered(observed); // The post-navigation layout.
ASSERT_FALSE(NULL == form_to_save.get());
- EXPECT_CALL(*store_, AddLogin(FormMatches(form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
// Simulate saving the form, as if the info bar was accepted.
form_to_save->Save();
@@ -280,7 +280,7 @@ TEST_F(PasswordManagerTest, FormSubmitAfterNavigateSubframe) {
TEST_F(PasswordManagerTest, FormSubmitWithFormOnPreviousPage) {
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
PasswordForm first_form(MakeSimpleForm());
first_form.origin = GURL("http://www.nytimes.com/");
@@ -324,7 +324,7 @@ TEST_F(PasswordManagerTest, FormSubmitWithFormOnPreviousPage) {
// Make sure that the saved form matches the second form, not the first.
ASSERT_TRUE(form_to_save.get());
- EXPECT_CALL(*store_, AddLogin(FormMatches(second_form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(second_form)));
// Simulate saving the form, as if the info bar was accepted.
form_to_save->Save();
@@ -333,7 +333,7 @@ TEST_F(PasswordManagerTest, FormSubmitWithFormOnPreviousPage) {
TEST_F(PasswordManagerTest, FormSubmitFailedLogin) {
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -354,7 +354,7 @@ TEST_F(PasswordManagerTest, FormSubmitInvisibleLogin) {
// page, but is invisible, it shouldn't count as a failed login.
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -375,7 +375,7 @@ TEST_F(PasswordManagerTest, FormSubmitInvisibleLogin) {
manager()->OnPasswordFormsRendered(observed);
ASSERT_TRUE(form_to_save.get());
- EXPECT_CALL(*store_, AddLogin(FormMatches(form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
// Simulate saving the form.
form_to_save->Save();
@@ -387,7 +387,7 @@ TEST_F(PasswordManagerTest, InitiallyInvisibleForm) {
PasswordForm* existing = new PasswordForm(MakeSimpleForm());
result.push_back(existing);
EXPECT_CALL(delegate_, FillPasswordForm(_));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -424,7 +424,7 @@ TEST_F(PasswordManagerTest, FillPasswordsOnDisabledManager) {
prefService->SetUserPref(prefs::kPasswordManagerEnabled,
Value::CreateBooleanValue(false));
EXPECT_CALL(delegate_, FillPasswordForm(_));
- EXPECT_CALL(*store_, GetLogins(_, _))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillRepeatedly(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -437,7 +437,7 @@ TEST_F(PasswordManagerTest, FormNotSavedAutocompleteOff) {
// autocomplete=off.
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -452,7 +452,7 @@ TEST_F(PasswordManagerTest, FormNotSavedAutocompleteOff) {
// Password form should not be saved.
EXPECT_CALL(delegate_,
AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, AddLogin(FormMatches(form))).Times(Exactly(0));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form))).Times(Exactly(0));
// Now the password manager waits for the navigation to complete.
observed.clear();
@@ -465,7 +465,7 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSavedAutocompleteOff) {
// autocomplete=off.
std::vector<PasswordForm*> result; // Empty password store.
EXPECT_CALL(delegate_, FillPasswordForm(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, GetLogins(_,_))
+ EXPECT_CALL(*store_.get(), GetLogins(_, _))
.WillOnce(DoAll(WithArg<1>(InvokeConsumer(result)), Return(1)));
std::vector<PasswordForm> observed;
PasswordForm form(MakeSimpleForm());
@@ -483,7 +483,7 @@ TEST_F(PasswordManagerTest, GeneratedPasswordFormSavedAutocompleteOff) {
// navigation occurs.
EXPECT_CALL(delegate_,
AddSavePasswordInfoBarIfPermitted(_)).Times(Exactly(0));
- EXPECT_CALL(*store_, AddLogin(FormMatches(form)));
+ EXPECT_CALL(*store_.get(), AddLogin(FormMatches(form)));
// Now the password manager waits for the navigation to complete.
observed.clear();
diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc
index f85367c..87e062b 100644
--- a/chrome/browser/password_manager/password_store.cc
+++ b/chrome/browser/password_manager/password_store.cc
@@ -199,7 +199,7 @@ CancelableRequestProvider::Handle PasswordStore::Schedule(
NewGetLoginsRequest(
base::Bind(&PasswordStoreConsumer::OnPasswordStoreRequestDone,
base::Unretained(consumer))));
- AddRequest(request, consumer->cancelable_consumer());
+ AddRequest(request.get(), consumer->cancelable_consumer());
ScheduleTask(base::Bind(func, this, request));
return request->handle();
}
@@ -215,7 +215,7 @@ CancelableRequestProvider::Handle PasswordStore::Schedule(
base::Bind(&PasswordStoreConsumer::OnPasswordStoreRequestDone,
base::Unretained(consumer))));
request->set_ignore_logins_cutoff(ignore_logins_cutoff);
- AddRequest(request, consumer->cancelable_consumer());
+ AddRequest(request.get(), consumer->cancelable_consumer());
ScheduleTask(base::Bind(func, this, request, form));
return request->handle();
}
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index 825f2ab..69dfbe5 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -209,18 +209,18 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
scoped_ptr<PasswordForm> form(CreatePasswordFormFromData(form_data));
scoped_refptr<DBThreadObserverHelper> helper = new DBThreadObserverHelper;
- helper->Init(store);
+ helper->Init(store.get());
const PasswordStoreChange expected_add_changes[] = {
PasswordStoreChange(PasswordStoreChange::ADD, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
- Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_add_changes)))));
+ content::Source<PasswordStore>(store.get()),
+ Property(&content::Details<const PasswordStoreChangeList>::ptr,
+ Pointee(ElementsAreArray(expected_add_changes)))));
// Adding a login should trigger a notification.
store->AddLogin(*form);
@@ -239,12 +239,12 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
PasswordStoreChange(PasswordStoreChange::UPDATE, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_update_changes)))));
+ Pointee(ElementsAreArray(expected_update_changes)))));
// Updating the login with the new password should trigger a notification.
store->UpdateLogin(*form);
@@ -258,12 +258,12 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
PasswordStoreChange(PasswordStoreChange::REMOVE, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_delete_changes)))));
+ Pointee(ElementsAreArray(expected_delete_changes)))));
// Deleting the login should trigger a notification.
store->RemoveLogin(*form);
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
index 1c9a438..b0f48c8 100644
--- a/chrome/browser/password_manager/password_store_factory.cc
+++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -184,10 +184,10 @@ PasswordStoreFactory::BuildServiceInstanceFor(
#else
NOTIMPLEMENTED();
#endif
- if (!ps)
+ if (!ps.get())
delete login_db;
- if (!ps || !ps->Init()) {
+ if (!ps.get() || !ps->Init()) {
NOTREACHED() << "Could not initialize password manager.";
return NULL;
}
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 6be0ab9..a6b5bc3 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -342,18 +342,18 @@ TEST_P(PasswordStoreXTest, Notifications) {
scoped_ptr<PasswordForm> form(CreatePasswordFormFromData(form_data));
scoped_refptr<DBThreadObserverHelper> helper = new DBThreadObserverHelper;
- helper->Init(store);
+ helper->Init(store.get());
const PasswordStoreChange expected_add_changes[] = {
PasswordStoreChange(PasswordStoreChange::ADD, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_add_changes)))));
+ Pointee(ElementsAreArray(expected_add_changes)))));
// Adding a login should trigger a notification.
store->AddLogin(*form);
@@ -372,12 +372,12 @@ TEST_P(PasswordStoreXTest, Notifications) {
PasswordStoreChange(PasswordStoreChange::UPDATE, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_update_changes)))));
+ Pointee(ElementsAreArray(expected_update_changes)))));
// Updating the login with the new password should trigger a notification.
store->UpdateLogin(*form);
@@ -391,12 +391,12 @@ TEST_P(PasswordStoreXTest, Notifications) {
PasswordStoreChange(PasswordStoreChange::REMOVE, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_delete_changes)))));
+ Pointee(ElementsAreArray(expected_delete_changes)))));
// Deleting the login should trigger a notification.
store->RemoveLogin(*form);
@@ -407,7 +407,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
done.Wait();
// Public in PasswordStore, protected in PasswordStoreX.
- static_cast<PasswordStore*>(store)->ShutdownOnUIThread();
+ static_cast<PasswordStore*>(store.get())->ShutdownOnUIThread();
}
TEST_P(PasswordStoreXTest, NativeMigration) {
@@ -544,7 +544,7 @@ TEST_P(PasswordStoreXTest, NativeMigration) {
STLDeleteElements(&expected_blacklisted);
// Public in PasswordStore, protected in PasswordStoreX.
- static_cast<PasswordStore*>(store)->ShutdownOnUIThread();
+ static_cast<PasswordStore*>(store.get())->ShutdownOnUIThread();
}
INSTANTIATE_TEST_CASE_P(NoBackend,
diff --git a/chrome/browser/plugins/plugin_status_pref_setter.cc b/chrome/browser/plugins/plugin_status_pref_setter.cc
index b5dd358..79beda9 100644
--- a/chrome/browser/plugins/plugin_status_pref_setter.cc
+++ b/chrome/browser/plugins/plugin_status_pref_setter.cc
@@ -63,10 +63,10 @@ void PluginStatusPrefSetter::GotPlugins(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Set the values on the PrefService instead of through the PrefMembers to
// notify observers if they changed.
- profile_->GetPrefs()->SetBoolean(
- clear_plugin_lso_data_enabled_.GetPrefName().c_str(),
- PluginDataRemoverHelper::IsSupported(plugin_prefs));
+ profile_->GetPrefs()
+ ->SetBoolean(clear_plugin_lso_data_enabled_.GetPrefName().c_str(),
+ PluginDataRemoverHelper::IsSupported(plugin_prefs.get()));
profile_->GetPrefs()->SetBoolean(
pepper_flash_settings_enabled_.GetPrefName().c_str(),
- PepperFlashSettingsManager::IsPepperFlashInUse(plugin_prefs, NULL));
+ PepperFlashSettingsManager::IsPepperFlashInUse(plugin_prefs.get(), NULL));
}
diff --git a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc
index 0636a7d..4748694 100644
--- a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc
+++ b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc
@@ -121,7 +121,7 @@ class ComponentCloudPolicyTest : public ExtensionBrowserTest {
ExtensionTestMessageListener ready_listener("ready", true);
event_listener_.reset(new ExtensionTestMessageListener("event", true));
extension_ = LoadExtension(kTestExtensionPath);
- ASSERT_TRUE(extension_);
+ ASSERT_TRUE(extension_.get());
ASSERT_EQ(kTestExtension, extension_->id());
EXPECT_TRUE(ready_listener.WaitUntilSatisfied());
@@ -177,7 +177,7 @@ class ComponentCloudPolicyTest : public ExtensionBrowserTest {
}
scoped_refptr<const extensions::Extension> extension(
ExtensionBrowserTest::LoadExtension(full_path.Append(path)));
- if (!extension) {
+ if (!extension.get()) {
ADD_FAILURE();
return NULL;
}
diff --git a/chrome/browser/policy/cloud/device_management_service.cc b/chrome/browser/policy/cloud/device_management_service.cc
index 3b065897..8e62c8a 100644
--- a/chrome/browser/policy/cloud/device_management_service.cc
+++ b/chrome/browser/policy/cloud/device_management_service.cc
@@ -567,7 +567,7 @@ void DeviceManagementService::ScheduleInitialization(int64 delay_milliseconds) {
void DeviceManagementService::Initialize() {
if (initialized_)
return;
- DCHECK(!request_context_getter_);
+ DCHECK(!request_context_getter_.get());
request_context_getter_ = new DeviceManagementRequestContextGetter(
g_browser_process->system_request_context());
initialized_ = true;
diff --git a/chrome/browser/policy/cloud/external_policy_data_updater.cc b/chrome/browser/policy/cloud/external_policy_data_updater.cc
index a987e43..c257442 100644
--- a/chrome/browser/policy/cloud/external_policy_data_updater.cc
+++ b/chrome/browser/policy/cloud/external_policy_data_updater.cc
@@ -217,11 +217,9 @@ const ExternalPolicyDataUpdater::Request&
void ExternalPolicyDataUpdater::FetchJob::Start() {
fetcher_.reset(net::URLFetcher::Create(id_, GURL(request_.url),
net::URLFetcher::GET, this));
- fetcher_->SetRequestContext(updater_->request_context_);
- fetcher_->SetLoadFlags(net::LOAD_BYPASS_CACHE |
- net::LOAD_DISABLE_CACHE |
- net::LOAD_DO_NOT_SAVE_COOKIES |
- net::LOAD_IS_DOWNLOAD |
+ fetcher_->SetRequestContext(updater_->request_context_.get());
+ fetcher_->SetLoadFlags(net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
+ net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_IS_DOWNLOAD |
net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SEND_AUTH_DATA);
fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
diff --git a/chrome/browser/policy/managed_mode_policy_provider_unittest.cc b/chrome/browser/policy/managed_mode_policy_provider_unittest.cc
index 92782a1..8bc7293 100644
--- a/chrome/browser/policy/managed_mode_policy_provider_unittest.cc
+++ b/chrome/browser/policy/managed_mode_policy_provider_unittest.cc
@@ -66,7 +66,7 @@ void TestHarness::SetUp() {
ConfigurationPolicyProvider* TestHarness::CreateProvider(
const PolicyDefinitionList* policy_definition_list) {
- return new ManagedModePolicyProvider(pref_store_);
+ return new ManagedModePolicyProvider(pref_store_.get());
}
void TestHarness::InstallEmptyPolicy() {}
@@ -124,8 +124,7 @@ INSTANTIATE_TEST_CASE_P(
class ManagedModePolicyProviderAPITest : public PolicyTestBase {
protected:
ManagedModePolicyProviderAPITest()
- : pref_store_(new TestingPrefStore),
- provider_(pref_store_) {
+ : pref_store_(new TestingPrefStore), provider_(pref_store_.get()) {
pref_store_->SetInitializationCompleted();
}
virtual ~ManagedModePolicyProviderAPITest() {}
@@ -170,7 +169,7 @@ TEST_F(ManagedModePolicyProviderAPITest, SetPolicy) {
EXPECT_TRUE(provider_.policies().Equals(expected_bundle));
// A newly-created provider should have the same policies.
- ManagedModePolicyProvider new_provider(pref_store_);
+ ManagedModePolicyProvider new_provider(pref_store_.get());
new_provider.Init();
EXPECT_TRUE(new_provider.policies().Equals(expected_bundle));
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc
index 1572d80..90d2418f 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor.cc
@@ -150,10 +150,9 @@ void AutocompleteActionPredictor::StartPrerendering(
content::SessionStorageNamespaceMap::const_iterator it =
session_storage_namespace_map.find(std::string());
if (it != session_storage_namespace_map.end())
- session_storage_namespace = it->second;
- prerender_handle_.reset(
- prerender_manager->AddPrerenderFromOmnibox(
- url, session_storage_namespace, size));
+ session_storage_namespace = it->second.get();
+ prerender_handle_.reset(prerender_manager->AddPrerenderFromOmnibox(
+ url, session_storage_namespace, size));
}
if (old_prerender_handle)
old_prerender_handle->OnCancel();
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc
index b37f3a1..e6917df 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -208,7 +208,7 @@ bool ResourcePrefetchPredictor::IsHandledSubresource(
resource_status |= RESOURCE_STATUS_URL_TOO_LONG;
}
- if (!response->response_info().headers)
+ if (!response->response_info().headers.get())
resource_status |= RESOURCE_STATUS_HEADERS_MISSING;
if (!IsCacheable(response))
@@ -229,7 +229,7 @@ bool ResourcePrefetchPredictor::IsCacheable(const net::URLRequest* response) {
// For non cached responses, we will ensure that the freshness lifetime is
// some sane value.
const net::HttpResponseInfo& response_info = response->response_info();
- if (!response_info.headers)
+ if (!response_info.headers.get())
return false;
base::Time response_time(response_info.response_time);
response_time += base::TimeDelta::FromSeconds(1);
@@ -442,7 +442,7 @@ void ResourcePrefetchPredictor::Observe(
}
void ResourcePrefetchPredictor::Shutdown() {
- if (prefetch_manager_) {
+ if (prefetch_manager_.get()) {
prefetch_manager_->ShutdownOnUIThread();
prefetch_manager_ = NULL;
}
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
index aa1e02a..cde7ceb 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
@@ -195,7 +195,7 @@ void ResourcePrefetchPredictorTest::SetUp() {
ResetPredictor();
EXPECT_EQ(predictor_->initialization_state_,
ResourcePrefetchPredictor::NOT_INITIALIZED);
- EXPECT_CALL(*mock_tables_,
+ EXPECT_CALL(*mock_tables_.get(),
GetAllData(Pointee(ContainerEq(PrefetchDataMap())),
Pointee(ContainerEq(PrefetchDataMap()))));
InitializePredictor();
@@ -354,7 +354,7 @@ TEST_F(ResourcePrefetchPredictorTest, LazilyInitializeWithData) {
AddUrlToHistory("http://www.google.com/", 4);
AddUrlToHistory("http://www.yahoo.com/", 2);
- EXPECT_CALL(*mock_tables_,
+ EXPECT_CALL(*mock_tables_.get(),
GetAllData(Pointee(ContainerEq(PrefetchDataMap())),
Pointee(ContainerEq(PrefetchDataMap()))))
.WillOnce(DoAll(SetArgPointee<0>(test_url_data_),
@@ -423,7 +423,7 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationNotRecorded) {
0,
0,
3.0));
- EXPECT_CALL(*mock_tables_, UpdateData(empty_url_data_, host_data));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(empty_url_data_, host_data));
predictor_->OnNavigationComplete(main_frame.navigation_id);
profile_->BlockUntilHistoryProcessesPendingRequests();
@@ -507,11 +507,11 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlNotInDB) {
0,
0,
7.0));
- EXPECT_CALL(*mock_tables_, UpdateData(url_data, empty_host_data_));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(url_data, empty_host_data_));
PrefetchData host_data(PREFETCH_KEY_TYPE_HOST, "www.google.com");
host_data.resources = url_data.resources;
- EXPECT_CALL(*mock_tables_, UpdateData(empty_url_data_, host_data));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(empty_url_data_, host_data));
predictor_->OnNavigationComplete(main_frame.navigation_id);
profile_->BlockUntilHistoryProcessesPendingRequests();
@@ -522,7 +522,7 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlInDB) {
// the database cache.
AddUrlToHistory("http://www.google.com", 4);
- EXPECT_CALL(*mock_tables_,
+ EXPECT_CALL(*mock_tables_.get(),
GetAllData(Pointee(ContainerEq(PrefetchDataMap())),
Pointee(ContainerEq(PrefetchDataMap()))))
.WillOnce(DoAll(SetArgPointee<0>(test_url_data_),
@@ -605,11 +605,11 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlInDB) {
0,
0,
3.0));
- EXPECT_CALL(*mock_tables_, UpdateData(url_data, empty_host_data_));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(url_data, empty_host_data_));
- EXPECT_CALL(*mock_tables_,
- DeleteSingleDataPoint("www.facebook.com",
- PREFETCH_KEY_TYPE_HOST));
+ EXPECT_CALL(
+ *mock_tables_.get(),
+ DeleteSingleDataPoint("www.facebook.com", PREFETCH_KEY_TYPE_HOST));
PrefetchData host_data(PREFETCH_KEY_TYPE_HOST, "www.google.com");
host_data.resources.push_back(ResourceRow(std::string(),
@@ -640,7 +640,7 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlInDB) {
0,
0,
7.0));
- EXPECT_CALL(*mock_tables_, UpdateData(empty_url_data_, host_data));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(empty_url_data_, host_data));
predictor_->OnNavigationComplete(main_frame.navigation_id);
profile_->BlockUntilHistoryProcessesPendingRequests();
@@ -650,7 +650,7 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlNotInDBAndDBFull) {
// Tests that a URL is deleted before another is added if the cache is full.
AddUrlToHistory("http://www.nike.com/", 4);
- EXPECT_CALL(*mock_tables_,
+ EXPECT_CALL(*mock_tables_.get(),
GetAllData(Pointee(ContainerEq(PrefetchDataMap())),
Pointee(ContainerEq(PrefetchDataMap()))))
.WillOnce(DoAll(SetArgPointee<0>(test_url_data_),
@@ -680,12 +680,12 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlNotInDBAndDBFull) {
ResourceType::IMAGE, "image/png", false);
predictor_->RecordUrlResponse(resource2);
- EXPECT_CALL(*mock_tables_,
- DeleteSingleDataPoint("http://www.google.com/",
- PREFETCH_KEY_TYPE_URL));
- EXPECT_CALL(*mock_tables_,
- DeleteSingleDataPoint("www.facebook.com",
- PREFETCH_KEY_TYPE_HOST));
+ EXPECT_CALL(
+ *mock_tables_.get(),
+ DeleteSingleDataPoint("http://www.google.com/", PREFETCH_KEY_TYPE_URL));
+ EXPECT_CALL(
+ *mock_tables_.get(),
+ DeleteSingleDataPoint("www.facebook.com", PREFETCH_KEY_TYPE_HOST));
PrefetchData url_data(PREFETCH_KEY_TYPE_URL, "http://www.nike.com/");
url_data.resources.push_back(ResourceRow(std::string(),
@@ -702,11 +702,11 @@ TEST_F(ResourcePrefetchPredictorTest, NavigationUrlNotInDBAndDBFull) {
0,
0,
2.0));
- EXPECT_CALL(*mock_tables_, UpdateData(url_data, empty_host_data_));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(url_data, empty_host_data_));
PrefetchData host_data(PREFETCH_KEY_TYPE_HOST, "www.nike.com");
host_data.resources = url_data.resources;
- EXPECT_CALL(*mock_tables_, UpdateData(empty_url_data_, host_data));
+ EXPECT_CALL(*mock_tables_.get(), UpdateData(empty_url_data_, host_data));
predictor_->OnNavigationComplete(main_frame.navigation_id);
profile_->BlockUntilHistoryProcessesPendingRequests();
@@ -752,15 +752,15 @@ TEST_F(ResourcePrefetchPredictorTest, DeleteUrls) {
hosts_to_delete.push_back("www.google.com");
hosts_to_delete.push_back("www.apple.com");
- EXPECT_CALL(*mock_tables_,
- DeleteData(ContainerEq(urls_to_delete),
- ContainerEq(hosts_to_delete)));
+ EXPECT_CALL(
+ *mock_tables_.get(),
+ DeleteData(ContainerEq(urls_to_delete), ContainerEq(hosts_to_delete)));
predictor_->DeleteUrls(rows);
EXPECT_EQ(2, static_cast<int>(predictor_->url_table_cache_->size()));
EXPECT_EQ(1, static_cast<int>(predictor_->host_table_cache_->size()));
- EXPECT_CALL(*mock_tables_, DeleteAllData());
+ EXPECT_CALL(*mock_tables_.get(), DeleteAllData());
predictor_->DeleteAllUrls();
EXPECT_TRUE(predictor_->url_table_cache_->empty());
diff --git a/chrome/browser/predictors/resource_prefetcher.cc b/chrome/browser/predictors/resource_prefetcher.cc
index 1fff633..9acbe08 100644
--- a/chrome/browser/predictors/resource_prefetcher.cc
+++ b/chrome/browser/predictors/resource_prefetcher.cc
@@ -167,7 +167,7 @@ void ResourcePrefetcher::ReadFullResponse(net::URLRequest* request) {
int bytes_read = 0;
scoped_refptr<net::IOBuffer> buffer(new net::IOBuffer(
kResourceBufferSizeBytes));
- status = request->Read(buffer, kResourceBufferSizeBytes, &bytes_read);
+ status = request->Read(buffer.get(), kResourceBufferSizeBytes, &bytes_read);
if (status) {
status = ShouldContinueReadingRequest(request, bytes_read);
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index 51b3790..152c26f 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -83,7 +83,7 @@ void PrepareBuilder(
#endif // ENABLE_CONFIGURATION_POLICY
builder->WithAsync(async);
- builder->WithExtensionPrefs(extension_prefs);
+ builder->WithExtensionPrefs(extension_prefs.get());
builder->WithCommandLinePrefs(
new CommandLinePrefStore(CommandLine::ForCurrentProcess()));
builder->WithReadErrorCallback(base::Bind(&HandleReadError));
@@ -108,7 +108,7 @@ PrefService* CreateLocalState(
policy_service,
extension_prefs,
async);
- return builder.Create(pref_registry);
+ return builder.Create(pref_registry.get());
}
PrefServiceSyncable* CreateProfilePrefs(
@@ -125,7 +125,7 @@ PrefServiceSyncable* CreateProfilePrefs(
policy_service,
extension_prefs,
async);
- return builder.CreateSyncable(pref_registry);
+ return builder.CreateSyncable(pref_registry.get());
}
} // namespace chrome_prefs
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index f6a24a8..a3cb07d 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -103,7 +103,7 @@ TEST_F(ChromePrefServiceUserFilePrefsTest, PreserveEmptyValue) {
builder.WithUserFilePrefs(pref_file, message_loop_.message_loop_proxy());
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
- scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable(registry));
+ scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable(registry.get()));
// Register testing prefs.
registry->RegisterListPref("list",
diff --git a/chrome/browser/prefs/pref_service_syncable.cc b/chrome/browser/prefs/pref_service_syncable.cc
index 2ab7ff5..82c18ba 100644
--- a/chrome/browser/prefs/pref_service_syncable.cc
+++ b/chrome/browser/prefs/pref_service_syncable.cc
@@ -91,16 +91,15 @@ PrefServiceSyncable* PrefServiceSyncable::CreateIncognitoPrefService(
pref_registry_.get())->ForkForIncognito();
PrefServiceSyncable* incognito_service = new PrefServiceSyncable(
pref_notifier,
- pref_value_store_->CloneAndSpecialize(
- NULL, // managed
- incognito_extension_prefs,
- NULL, // command_line_prefs
- incognito_pref_store,
- NULL, // recommended
- forked_registry->defaults(),
- pref_notifier),
+ pref_value_store_->CloneAndSpecialize(NULL, // managed
+ incognito_extension_prefs,
+ NULL, // command_line_prefs
+ incognito_pref_store,
+ NULL, // recommended
+ forked_registry->defaults(),
+ pref_notifier),
incognito_pref_store,
- forked_registry,
+ forked_registry.get(),
read_error_callback_,
false);
return incognito_service;
diff --git a/chrome/browser/prefs/proxy_policy_unittest.cc b/chrome/browser/prefs/proxy_policy_unittest.cc
index 5185aac..f3d92be 100644
--- a/chrome/browser/prefs/proxy_policy_unittest.cc
+++ b/chrome/browser/prefs/proxy_policy_unittest.cc
@@ -101,8 +101,8 @@ class ProxyPolicyTest : public testing::Test {
builder.WithManagedPolicies(policy_service_.get());
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
- PrefServiceSyncable* prefs = builder.CreateSyncable(registry);
- chrome::RegisterUserPrefs(registry);
+ PrefServiceSyncable* prefs = builder.CreateSyncable(registry.get());
+ chrome::RegisterUserPrefs(registry.get());
return prefs;
}
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index 46ac3b9..72bb371 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -2624,7 +2624,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest,
web_contents->GetRenderViewHost()));
DevToolsManager* manager = DevToolsManager::GetInstance();
FakeDevToolsClientHost client_host;
- manager->RegisterDevToolsClientHostFor(agent, &client_host);
+ manager->RegisterDevToolsClientHostFor(agent.get(), &client_host);
const char* url = "files/prerender/prerender_page.html";
PrerenderTestURL(url, FINAL_STATUS_DEVTOOLS_ATTACHED, 1);
NavigateToURL(url);
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 16ddb79..e7e43f8 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -1438,11 +1438,13 @@ void PrerenderManager::RecordLikelyLoginOnURL(const GURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!IsWebURL(url))
return;
- if (logged_in_predictor_table_) {
+ if (logged_in_predictor_table_.get()) {
BrowserThread::PostTask(
- BrowserThread::DB, FROM_HERE,
+ BrowserThread::DB,
+ FROM_HERE,
base::Bind(&LoggedInPredictorTable::AddDomainFromURL,
- logged_in_predictor_table_, url));
+ logged_in_predictor_table_,
+ url));
}
std::string key = LoggedInPredictorTable::GetKey(url);
if (!logged_in_state_.get())
@@ -1458,7 +1460,7 @@ void PrerenderManager::CheckIfLikelyLoggedInOnURL(
bool* database_was_present,
const base::Closure& result_cb) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!logged_in_predictor_table_) {
+ if (!logged_in_predictor_table_.get()) {
*database_was_present = false;
*lookup_result = false;
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, result_cb);
@@ -1517,11 +1519,12 @@ void PrerenderManager::CookieChangedAnyCookiesLeftLookupResult(
if (cookies_exist)
return;
- if (logged_in_predictor_table_) {
- BrowserThread::PostTask(
- BrowserThread::DB, FROM_HERE,
- base::Bind(&LoggedInPredictorTable::DeleteDomain,
- logged_in_predictor_table_, domain_key));
+ if (logged_in_predictor_table_.get()) {
+ BrowserThread::PostTask(BrowserThread::DB,
+ FROM_HERE,
+ base::Bind(&LoggedInPredictorTable::DeleteDomain,
+ logged_in_predictor_table_,
+ domain_key));
}
if (logged_in_state_.get())
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
index 2fffdb3..21b1fac 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
@@ -154,7 +154,7 @@ void CloudPrintProxyService::GetPrintersAvalibleForRegistration(
printing::PrinterList printer_list;
scoped_refptr<printing::PrintBackend> backend(
printing::PrintBackend::CreateInstance(NULL));
- if (backend)
+ if (backend.get())
backend->EnumeratePrinters(&printer_list);
for (size_t i = 0; i < printer_list.size(); ++i)
printers->push_back(printer_list[i].printer_name);
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 4e573c2..95d4247 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -213,7 +213,7 @@ CloudPrintDataSender::~CloudPrintDataSender() {}
// needed. - 4/1/2010
void CloudPrintDataSender::SendPrintData() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- if (!data_ || !data_->size())
+ if (!data_.get() || !data_->size())
return;
std::string base64_data;
@@ -373,8 +373,11 @@ CloudPrintFlowHandler::CreateCloudPrintDataSender() {
DCHECK(web_ui());
print_data_helper_.reset(new CloudPrintDataSenderHelper(web_ui()));
scoped_refptr<CloudPrintDataSender> sender(
- new CloudPrintDataSender(print_data_helper_.get(), print_job_title_,
- print_ticket_, file_type_, data_));
+ new CloudPrintDataSender(print_data_helper_.get(),
+ print_job_title_,
+ print_ticket_,
+ file_type_,
+ data_.get()));
return sender;
}
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index a8dda75..f71bc39 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -392,12 +392,8 @@ JobEventDetails::JobEventDetails(Type type,
JobEventDetails::~JobEventDetails() {
}
-PrintedDocument* JobEventDetails::document() const {
- return document_;
-}
+PrintedDocument* JobEventDetails::document() const { return document_.get(); }
-PrintedPage* JobEventDetails::page() const {
- return page_;
-}
+PrintedPage* JobEventDetails::page() const { return page_.get(); }
} // namespace printing
diff --git a/chrome/browser/printing/print_job_manager.cc b/chrome/browser/printing/print_job_manager.cc
index 2629ccc..bb669ec 100644
--- a/chrome/browser/printing/print_job_manager.cc
+++ b/chrome/browser/printing/print_job_manager.cc
@@ -60,7 +60,7 @@ void PrintJobManager::PopPrinterQuery(int document_cookie,
for (PrinterQueries::iterator itr = queued_queries_.begin();
itr != queued_queries_.end();
++itr) {
- PrinterQuery* current_query = *itr;
+ PrinterQuery* current_query = itr->get();
if (current_query->cookie() == document_cookie &&
!current_query->is_callback_pending()) {
*job = current_query;
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index a90cda0..5e0cd88 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -201,7 +201,7 @@ void PrintJobWorker::StartPrinting(PrintedDocument* new_document) {
DCHECK(new_document->settings().Equals(printing_context_->settings()));
if (!document_.get() || page_number_ != PageNumber::npos() ||
- document_ != new_document) {
+ document_.get() != new_document) {
return;
}
@@ -274,7 +274,7 @@ void PrintJobWorker::OnNewPage() {
break;
}
// The page is there, print it.
- SpoolPage(page);
+ SpoolPage(page.get());
++page_number_;
if (page_number_ == PageNumber::npos()) {
OnDocumentDone();
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 8aed1a0..af43456 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -192,7 +192,7 @@ void PrintViewManager::RenderViewGone(base::TerminationStatus status) {
return;
scoped_refptr<PrintedDocument> document(print_job_->document());
- if (document) {
+ if (document.get()) {
// If IsComplete() returns false, the document isn't completely rendered.
// Since our renderer is gone, there's nothing to do, cancel it. Otherwise,
// the print job may finish without problem.
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
index 53a4166..ff8f893 100644
--- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -24,7 +24,7 @@ class MockObject {
}
void StopLoop() {
- DCHECK(runner_);
+ DCHECK(runner_.get());
Callback();
runner_->Quit();
}
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 842a30d..6fd6e94 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -148,7 +148,7 @@ OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
BrowserThread::IO, FROM_HERE,
base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this));
- if (host_content_settings_map_)
+ if (host_content_settings_map_.get())
host_content_settings_map_->ShutdownOnUIThread();
if (pref_proxy_config_tracker_)
@@ -305,7 +305,7 @@ HostContentSettingsMap* OffTheRecordProfileImpl::GetHostContentSettingsMap() {
// Retrieve the host content settings map of the parent profile in order to
// ensure the preferences have been migrated.
profile_->GetHostContentSettingsMap();
- if (!host_content_settings_map_) {
+ if (!host_content_settings_map_.get()) {
host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true);
#if defined(ENABLE_EXTENSIONS)
ExtensionService* extension_service = GetExtensionService();
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index ce52899..37b0758 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -77,7 +77,7 @@ OffTheRecordProfileIOData::Handle::CreateMainRequestContextGetter(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
#endif // defined(OS_CHROMEOS)
LazyInitialize();
- DCHECK(!main_request_context_getter_);
+ DCHECK(!main_request_context_getter_.get());
main_request_context_getter_ =
ChromeURLRequestContextGetter::CreateOffTheRecord(
profile_, io_data_, protocol_handlers);
@@ -88,7 +88,7 @@ scoped_refptr<ChromeURLRequestContextGetter>
OffTheRecordProfileIOData::Handle::GetExtensionsRequestContextGetter() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
- if (!extensions_request_context_getter_) {
+ if (!extensions_request_context_getter_.get()) {
extensions_request_context_getter_ =
ChromeURLRequestContextGetter::CreateOffTheRecordForExtensions(
profile_, io_data_);
@@ -201,8 +201,8 @@ void OffTheRecordProfileIOData::InitializeInternal(
set_server_bound_cert_service(server_bound_cert_service);
main_context->set_server_bound_cert_service(server_bound_cert_service);
- main_context->set_cookie_store(
- new net::CookieMonster(NULL, profile_params->cookie_monster_delegate));
+ main_context->set_cookie_store(new net::CookieMonster(
+ NULL, profile_params->cookie_monster_delegate.get()));
net::HttpCache::BackendFactory* main_backend =
net::HttpCache::DefaultBackend::InMemory(0);
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 90496c3..d72efb9 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -251,7 +251,7 @@ Profile* Profile::CreateProfile(const base::FilePath& path,
BrowserThread::GetBlockingPool());
if (create_mode == CREATE_MODE_ASYNCHRONOUS) {
DCHECK(delegate);
- CreateProfileDirectory(sequenced_task_runner, path);
+ CreateProfileDirectory(sequenced_task_runner.get(), path);
} else if (create_mode == CREATE_MODE_SYNCHRONOUS) {
if (!file_util::PathExists(path)) {
// TODO(tc): http://b/1094718 Bad things happen if we can't write to the
@@ -264,7 +264,8 @@ Profile* Profile::CreateProfile(const base::FilePath& path,
NOTREACHED();
}
- return new ProfileImpl(path, delegate, create_mode, sequenced_task_runner);
+ return new ProfileImpl(
+ path, delegate, create_mode, sequenced_task_runner.get());
}
// static
@@ -396,7 +397,7 @@ ProfileImpl::ProfileImpl(
create_mode == CREATE_MODE_SYNCHRONOUS);
bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS;
- chrome::RegisterUserPrefs(pref_registry_);
+ chrome::RegisterUserPrefs(pref_registry_.get());
{
// On startup, preference loading is always synchronous so a scoped timer
@@ -459,7 +460,7 @@ void ProfileImpl::DoFinalInit() {
scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner =
JsonPrefStore::GetTaskRunnerForFile(base_cache_path_,
BrowserThread::GetBlockingPool());
- CreateProfileDirectory(sequenced_task_runner, base_cache_path_);
+ CreateProfileDirectory(sequenced_task_runner.get(), base_cache_path_);
// Now that the profile is hooked up to receive pref change notifications to
// kGoogleServicesUsername, initialize components that depend on it to reflect
@@ -639,13 +640,13 @@ ProfileImpl::~ProfileImpl() {
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
this);
- if (top_sites_)
+ if (top_sites_.get())
top_sites_->Shutdown();
if (pref_proxy_config_tracker_)
pref_proxy_config_tracker_->DetachFromPrefService();
- if (host_content_settings_map_)
+ if (host_content_settings_map_.get())
host_content_settings_map_->ShutdownOnUIThread();
// This causes the Preferences file to be written to disk.
@@ -703,7 +704,7 @@ ExtensionService* ProfileImpl::GetExtensionService() {
ExtensionSpecialStoragePolicy*
ProfileImpl::GetExtensionSpecialStoragePolicy() {
- if (!extension_special_storage_policy_) {
+ if (!extension_special_storage_policy_.get()) {
TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy")
extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(
CookieSettings::Factory::GetForProfile(this));
@@ -885,7 +886,7 @@ net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
}
HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() {
- if (!host_content_settings_map_) {
+ if (!host_content_settings_map_.get()) {
host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false);
}
return host_content_settings_map_.get();
@@ -926,15 +927,15 @@ Time ProfileImpl::GetStartTime() const {
}
history::TopSites* ProfileImpl::GetTopSites() {
- if (!top_sites_) {
+ if (!top_sites_.get()) {
top_sites_ = history::TopSites::Create(
this, GetPath().Append(chrome::kTopSitesFilename));
}
- return top_sites_;
+ return top_sites_.get();
}
history::TopSites* ProfileImpl::GetTopSitesWithoutCreating() {
- return top_sites_;
+ return top_sites_.get();
}
void ProfileImpl::OnDefaultZoomLevelChanged() {
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index f5a5c8b..8768fbe 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -161,14 +161,15 @@ ProfileImplIOData::Handle::CreateMainRequestContextGetter(
IOThread* io_thread) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
- DCHECK(!main_request_context_getter_);
+ DCHECK(!main_request_context_getter_.get());
main_request_context_getter_ = ChromeURLRequestContextGetter::CreateOriginal(
profile_, io_data_, protocol_handlers);
- io_data_->predictor_->InitNetworkPredictor(profile_->GetPrefs(),
- local_state,
- io_thread,
- main_request_context_getter_);
+ io_data_->predictor_
+ ->InitNetworkPredictor(profile_->GetPrefs(),
+ local_state,
+ io_thread,
+ main_request_context_getter_.get());
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PROFILE_URL_REQUEST_CONTEXT_GETTER_INITIALIZED,
@@ -181,10 +182,10 @@ scoped_refptr<ChromeURLRequestContextGetter>
ProfileImplIOData::Handle::GetMediaRequestContextGetter() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
- if (!media_request_context_getter_) {
+ if (!media_request_context_getter_.get()) {
media_request_context_getter_ =
- ChromeURLRequestContextGetter::CreateOriginalForMedia(
- profile_, io_data_);
+ ChromeURLRequestContextGetter::CreateOriginalForMedia(profile_,
+ io_data_);
}
return media_request_context_getter_;
}
@@ -193,10 +194,10 @@ scoped_refptr<ChromeURLRequestContextGetter>
ProfileImplIOData::Handle::GetExtensionsRequestContextGetter() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
- if (!extensions_request_context_getter_) {
+ if (!extensions_request_context_getter_.get()) {
extensions_request_context_getter_ =
- ChromeURLRequestContextGetter::CreateOriginalForExtensions(
- profile_, io_data_);
+ ChromeURLRequestContextGetter::CreateOriginalForExtensions(profile_,
+ io_data_);
}
return extensions_request_context_getter_;
}
@@ -255,7 +256,7 @@ ProfileImplIOData::Handle::GetIsolatedMediaRequestContextGetter(
ChromeURLRequestContextGetterMap::const_iterator app_iter =
app_request_context_getter_map_.find(descriptor);
DCHECK(app_iter != app_request_context_getter_map_.end());
- ChromeURLRequestContextGetter* app_context = app_iter->second;
+ ChromeURLRequestContextGetter* app_context = app_iter->second.get();
ChromeURLRequestContextGetter* context =
ChromeURLRequestContextGetter::CreateOriginalForIsolatedMedia(
profile_, app_context, io_data_, descriptor);
@@ -371,7 +372,7 @@ void ProfileImplIOData::InitializeInternal(
if (record_mode || playback_mode) {
// Don't use existing cookies and use an in-memory store.
cookie_store = new net::CookieMonster(
- NULL, profile_params->cookie_monster_delegate);
+ NULL, profile_params->cookie_monster_delegate.get());
// Don't use existing server-bound certs and use an in-memory store.
server_bound_cert_service = new net::ServerBoundCertService(
new net::DefaultServerBoundCertStore(NULL),
@@ -379,18 +380,18 @@ void ProfileImplIOData::InitializeInternal(
}
// setup cookie store
- if (!cookie_store) {
+ if (!cookie_store.get()) {
DCHECK(!lazy_params_->cookie_path.empty());
cookie_store = content::CreatePersistentCookieStore(
lazy_params_->cookie_path,
lazy_params_->restore_old_session_cookies,
- lazy_params_->special_storage_policy,
- profile_params->cookie_monster_delegate);
+ lazy_params_->special_storage_policy.get(),
+ profile_params->cookie_monster_delegate.get());
cookie_store->GetCookieMonster()->SetPersistSessionCookies(true);
}
- main_context->set_cookie_store(cookie_store);
+ main_context->set_cookie_store(cookie_store.get());
// Setup server bound cert service.
if (!server_bound_cert_service) {
@@ -399,7 +400,7 @@ void ProfileImplIOData::InitializeInternal(
scoped_refptr<SQLiteServerBoundCertStore> server_bound_cert_db =
new SQLiteServerBoundCertStore(
lazy_params_->server_bound_cert_path,
- lazy_params_->special_storage_policy);
+ lazy_params_->special_storage_policy.get());
server_bound_cert_service = new net::ServerBoundCertService(
new net::DefaultServerBoundCertStore(server_bound_cert_db.get()),
base::WorkerPool::GetTaskRunner(true));
@@ -558,7 +559,7 @@ ProfileImplIOData::InitializeAppRequestContext(
}
// Use an app-specific cookie store.
- if (!cookie_store) {
+ if (!cookie_store.get()) {
DCHECK(!cookie_path.empty());
// TODO(creis): We should have a cookie delegate for notifying the cookie
@@ -572,7 +573,7 @@ ProfileImplIOData::InitializeAppRequestContext(
}
// Transfer ownership of the cookies and cache to AppRequestContext.
- context->SetCookieStore(cookie_store);
+ context->SetCookieStore(cookie_store.get());
context->SetHttpTransactionFactory(
scoped_ptr<net::HttpTransactionFactory>(app_http_cache));
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 3ac1c3d..019d146 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -541,13 +541,13 @@ ChromeURLRequestContext* ProfileIOData::GetIsolatedMediaRequestContext(
ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const {
DCHECK(initialized_) << "ExtensionSystem not initialized";
- return extension_info_map_;
+ return extension_info_map_.get();
}
CookieSettings* ProfileIOData::GetCookieSettings() const {
// Allow either Init() or SetCookieSettingsForTesting() to initialize.
- DCHECK(initialized_ || cookie_settings_);
- return cookie_settings_;
+ DCHECK(initialized_ || cookie_settings_.get());
+ return cookie_settings_.get();
}
#if defined(ENABLE_NOTIFICATIONS)
@@ -660,10 +660,11 @@ void ProfileIOData::Init(content::ProtocolHandlerMap* protocol_handlers) const {
new ChromeNetworkDelegate(
io_thread_globals->extension_event_router_forwarder.get(),
&enable_referrers_);
- network_delegate->set_extension_info_map(profile_params_->extension_info_map);
+ network_delegate->set_extension_info_map(
+ profile_params_->extension_info_map.get());
network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
network_delegate->set_profile(profile_params_->profile);
- network_delegate->set_cookie_settings(profile_params_->cookie_settings);
+ network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
network_delegate->set_enable_do_not_track(&enable_do_not_track_);
network_delegate->set_force_google_safe_search(&force_safesearch_);
network_delegate->set_load_time_stats(load_time_stats_);
@@ -727,7 +728,7 @@ void ProfileIOData::ApplyProfileParamsToContext(
ChromeURLRequestContext* context) const {
context->set_http_user_agent_settings(
chrome_http_user_agent_settings_.get());
- context->set_ssl_config_service(profile_params_->ssl_config_service);
+ context->set_ssl_config_service(profile_params_->ssl_config_service.get());
}
scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
@@ -742,10 +743,11 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
chrome::kFileScheme, new net::FileProtocolHandler());
DCHECK(set_protocol);
- DCHECK(extension_info_map_);
+ DCHECK(extension_info_map_.get());
set_protocol = job_factory->SetProtocolHandler(
extensions::kExtensionScheme,
- CreateExtensionProtocolHandler(is_incognito(), extension_info_map_));
+ CreateExtensionProtocolHandler(is_incognito(),
+ extension_info_map_.get()));
DCHECK(set_protocol);
set_protocol = job_factory->SetProtocolHandler(
chrome::kExtensionResourceScheme,
@@ -856,7 +858,7 @@ void ProfileIOData::PopulateNetworkSessionParams(
void ProfileIOData::SetCookieSettingsForTesting(
CookieSettings* cookie_settings) {
- DCHECK(!cookie_settings_);
+ DCHECK(!cookie_settings_.get());
cookie_settings_ = cookie_settings;
}
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 7a68ffa..89fbcb5 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -102,8 +102,10 @@ class ProfileManagerTest : public testing::Test {
ui_thread_(BrowserThread::UI, &message_loop_),
db_thread_(BrowserThread::DB, &message_loop_),
file_thread_(BrowserThread::FILE, &message_loop_),
- io_thread_(local_state_.Get(), g_browser_process->policy_service(),
- NULL, extension_event_router_forwarder_) {
+ io_thread_(local_state_.Get(),
+ g_browser_process->policy_service(),
+ NULL,
+ extension_event_router_forwarder_.get()) {
TestingBrowserProcess::GetGlobal()->SetIOThread(&io_thread_);
}
diff --git a/chrome/browser/profiles/startup_task_runner_service.cc b/chrome/browser/profiles/startup_task_runner_service.cc
index 60407e1..d28bdd7 100644
--- a/chrome/browser/profiles/startup_task_runner_service.cc
+++ b/chrome/browser/profiles/startup_task_runner_service.cc
@@ -18,7 +18,7 @@ StartupTaskRunnerService::~StartupTaskRunnerService() {
scoped_refptr<base::DeferredSequencedTaskRunner>
StartupTaskRunnerService::GetBookmarkTaskRunner() {
DCHECK(CalledOnValidThread());
- if (!bookmark_task_runner_) {
+ if (!bookmark_task_runner_.get()) {
bookmark_task_runner_ =
new base::DeferredSequencedTaskRunner(profile_->GetIOTaskRunner());
}