OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/syncable_extension_settings_storage.h" | 5 #include "chrome/browser/extensions/syncable_extension_settings_storage.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/extensions/extension_settings_sync_util.h" | 8 #include "chrome/browser/extensions/extension_settings_sync_util.h" |
9 #include "chrome/browser/sync/api/sync_data.h" | 9 #include "chrome/browser/sync/api/sync_data.h" |
10 #include "chrome/browser/sync/protocol/extension_setting_specifics.pb.h" | 10 #include "chrome/browser/sync/protocol/extension_setting_specifics.pb.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 | 12 |
| 13 using content::BrowserThread; |
| 14 |
13 SyncableExtensionSettingsStorage::SyncableExtensionSettingsStorage( | 15 SyncableExtensionSettingsStorage::SyncableExtensionSettingsStorage( |
14 const scoped_refptr<ObserverListThreadSafe<ExtensionSettingsObserver> >& | 16 const scoped_refptr<ObserverListThreadSafe<ExtensionSettingsObserver> >& |
15 observers, | 17 observers, |
16 const std::string& extension_id, | 18 const std::string& extension_id, |
17 ExtensionSettingsStorage* delegate) | 19 ExtensionSettingsStorage* delegate) |
18 : observers_(observers), | 20 : observers_(observers), |
19 extension_id_(extension_id), | 21 extension_id_(extension_id), |
20 delegate_(delegate), | 22 delegate_(delegate), |
21 sync_processor_(NULL) { | 23 sync_processor_(NULL) { |
22 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 24 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 if (result.HasError()) { | 434 if (result.HasError()) { |
433 return SyncError( | 435 return SyncError( |
434 FROM_HERE, | 436 FROM_HERE, |
435 std::string("Error pushing sync remove to local settings: ") + | 437 std::string("Error pushing sync remove to local settings: ") + |
436 result.GetError(), | 438 result.GetError(), |
437 syncable::EXTENSION_SETTINGS); | 439 syncable::EXTENSION_SETTINGS); |
438 } | 440 } |
439 changes->AppendChange(key, old_value, NULL); | 441 changes->AppendChange(key, old_value, NULL); |
440 return SyncError(); | 442 return SyncError(); |
441 } | 443 } |
OLD | NEW |