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

Side by Side Diff: chrome/browser/sync_file_system/local_file_sync_service.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 "chrome/browser/sync_file_system/local_file_sync_service.h" 5 #include "chrome/browser/sync_file_system/local_file_sync_service.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 disabled_origins_.erase(origin); 89 disabled_origins_.erase(origin);
90 else 90 else
91 disabled_origins_.insert(origin); 91 disabled_origins_.insert(origin);
92 } 92 }
93 93
94 // LocalFileSyncService ------------------------------------------------------- 94 // LocalFileSyncService -------------------------------------------------------
95 95
96 LocalFileSyncService::LocalFileSyncService(Profile* profile) 96 LocalFileSyncService::LocalFileSyncService(Profile* profile)
97 : profile_(profile), 97 : profile_(profile),
98 sync_context_(new LocalFileSyncContext( 98 sync_context_(new LocalFileSyncContext(
99 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 99 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(),
100 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))), 100 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)
101 .get())),
101 local_change_processor_(NULL) { 102 local_change_processor_(NULL) {
102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
103 sync_context_->AddOriginChangeObserver(this); 104 sync_context_->AddOriginChangeObserver(this);
104 } 105 }
105 106
106 LocalFileSyncService::~LocalFileSyncService() { 107 LocalFileSyncService::~LocalFileSyncService() {
107 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
108 } 109 }
109 110
110 void LocalFileSyncService::Shutdown() { 111 void LocalFileSyncService::Shutdown() {
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 changes.front(), 424 changes.front(),
424 sync_file_info.local_file_path, 425 sync_file_info.local_file_path,
425 sync_file_info.metadata, 426 sync_file_info.metadata,
426 url, 427 url,
427 base::Bind(&LocalFileSyncService::ProcessNextChangeForURL, 428 base::Bind(&LocalFileSyncService::ProcessNextChangeForURL,
428 AsWeakPtr(), sync_file_info, 429 AsWeakPtr(), sync_file_info,
429 changes.front(), changes.PopAndGetNewList())); 430 changes.front(), changes.PopAndGetNewList()));
430 } 431 }
431 432
432 } // namespace sync_file_system 433 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698