Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 if (found != change_count_map_.end()) { | 78 if (found != change_count_map_.end()) { |
| 79 if (next_ == found) | 79 if (next_ == found) |
| 80 ++next_; | 80 ++next_; |
| 81 change_count_map_.erase(found); | 81 change_count_map_.erase(found); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| 85 void LocalFileSyncService::OriginChangeMap::SetOriginEnabled( | 85 void LocalFileSyncService::OriginChangeMap::SetOriginEnabled( |
| 86 const GURL& origin, bool enabled) { | 86 const GURL& origin, bool enabled) { |
| 87 if (enabled) { | 87 if (enabled) { |
| 88 DCHECK(ContainsKey(disabled_origins_, origin)); | |
| 89 disabled_origins_.erase(origin); | 88 disabled_origins_.erase(origin); |
| 90 } else { | 89 } else { |
| 91 disabled_origins_.insert(origin); | 90 disabled_origins_.insert(origin); |
| 92 } | 91 } |
|
kinuko
2013/03/18 18:09:43
nit: can you also remove these { } ?
nhiroki
2013/03/19 02:35:42
Done.
| |
| 93 } | 92 } |
| 94 | 93 |
| 95 // LocalFileSyncService ------------------------------------------------------- | 94 // LocalFileSyncService ------------------------------------------------------- |
| 96 | 95 |
| 97 LocalFileSyncService::LocalFileSyncService(Profile* profile) | 96 LocalFileSyncService::LocalFileSyncService(Profile* profile) |
| 98 : profile_(profile), | 97 : profile_(profile), |
| 99 sync_context_(new LocalFileSyncContext( | 98 sync_context_(new LocalFileSyncContext( |
| 100 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 99 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 101 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))), | 100 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))), |
| 102 local_change_processor_(NULL) { | 101 local_change_processor_(NULL) { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 408 changes.front(), | 407 changes.front(), |
| 409 sync_file_info.local_file_path, | 408 sync_file_info.local_file_path, |
| 410 sync_file_info.metadata, | 409 sync_file_info.metadata, |
| 411 url, | 410 url, |
| 412 base::Bind(&LocalFileSyncService::ProcessNextChangeForURL, | 411 base::Bind(&LocalFileSyncService::ProcessNextChangeForURL, |
| 413 AsWeakPtr(), sync_file_info, | 412 AsWeakPtr(), sync_file_info, |
| 414 changes.front(), changes.PopAndGetNewList())); | 413 changes.front(), changes.PopAndGetNewList())); |
| 415 } | 414 } |
| 416 | 415 |
| 417 } // namespace sync_file_system | 416 } // namespace sync_file_system |
| OLD | NEW |