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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sync/glue/sync_backend_host.h" 7 #include "chrome/browser/sync/glue/sync_backend_host.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 invalidator_factory_( 379 invalidator_factory_(
380 ParseNotifierOptions(*CommandLine::ForCurrentProcess(), 380 ParseNotifierOptions(*CommandLine::ForCurrentProcess(),
381 profile_->GetRequestContext()), 381 profile_->GetRequestContext()),
382 content::GetUserAgent(GURL()), 382 content::GetUserAgent(GURL()),
383 base::WeakPtr<syncer::InvalidationStateTracker>()), 383 base::WeakPtr<syncer::InvalidationStateTracker>()),
384 frontend_(NULL), 384 frontend_(NULL),
385 cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) { 385 cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {
386 } 386 }
387 387
388 SyncBackendHost::~SyncBackendHost() { 388 SyncBackendHost::~SyncBackendHost() {
389 DCHECK(!core_ && !frontend_) << "Must call Shutdown before destructor."; 389 DCHECK(!core_.get() && !frontend_) << "Must call Shutdown before destructor.";
390 DCHECK(!android_invalidator_bridge_.get()); 390 DCHECK(!android_invalidator_bridge_.get());
391 DCHECK(!registrar_.get()); 391 DCHECK(!registrar_.get());
392 } 392 }
393 393
394 namespace { 394 namespace {
395 395
396 scoped_ptr<syncer::HttpPostProviderFactory> MakeHttpBridgeFactory( 396 scoped_ptr<syncer::HttpPostProviderFactory> MakeHttpBridgeFactory(
397 const scoped_refptr<net::URLRequestContextGetter>& getter, 397 const scoped_refptr<net::URLRequestContextGetter>& getter,
398 const NetworkTimeTracker::UpdateCallback& update_callback) { 398 const NetworkTimeTracker::UpdateCallback& update_callback) {
399 chrome::VersionInfo version_info; 399 chrome::VersionInfo version_info;
400 return scoped_ptr<syncer::HttpPostProviderFactory>( 400 return scoped_ptr<syncer::HttpPostProviderFactory>(
401 new syncer::HttpBridgeFactory( 401 new syncer::HttpBridgeFactory(
402 getter, 402 getter.get(),
403 DeviceInfo::MakeUserAgentForSyncApi(version_info), 403 DeviceInfo::MakeUserAgentForSyncApi(version_info),
404 update_callback)); 404 update_callback));
405 } 405 }
406 406
407 } // namespace 407 } // namespace
408 408
409 void SyncBackendHost::Initialize( 409 void SyncBackendHost::Initialize(
410 SyncFrontend* frontend, 410 SyncFrontend* frontend,
411 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, 411 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
412 const GURL& sync_service_url, 412 const GURL& sync_service_url,
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 DVLOG(1) << "Connection status changed: " 1677 DVLOG(1) << "Connection status changed: "
1678 << syncer::ConnectionStatusToString(status); 1678 << syncer::ConnectionStatusToString(status);
1679 frontend_->OnConnectionStatusChange(status); 1679 frontend_->OnConnectionStatusChange(status);
1680 } 1680 }
1681 1681
1682 #undef SDVLOG 1682 #undef SDVLOG
1683 1683
1684 #undef SLOG 1684 #undef SLOG
1685 1685
1686 } // namespace browser_sync 1686 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/shared_change_processor.cc ('k') | chrome/browser/sync/glue/sync_backend_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698