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

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

Issue 10235013: [Sync] Add support for automatic enabling of syncing tab favicons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert testserver for now Created 8 years, 8 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 27 matching lines...) Expand all
38 #include "jingle/notifier/base/notification_method.h" 38 #include "jingle/notifier/base/notification_method.h"
39 #include "jingle/notifier/base/notifier_options.h" 39 #include "jingle/notifier/base/notifier_options.h"
40 #include "net/base/host_port_pair.h" 40 #include "net/base/host_port_pair.h"
41 #include "net/url_request/url_request_context_getter.h" 41 #include "net/url_request/url_request_context_getter.h"
42 #include "sync/engine/model_safe_worker.h" 42 #include "sync/engine/model_safe_worker.h"
43 #include "sync/internal_api/base_transaction.h" 43 #include "sync/internal_api/base_transaction.h"
44 #include "sync/internal_api/read_transaction.h" 44 #include "sync/internal_api/read_transaction.h"
45 #include "sync/notifier/sync_notifier.h" 45 #include "sync/notifier/sync_notifier.h"
46 #include "sync/protocol/encryption.pb.h" 46 #include "sync/protocol/encryption.pb.h"
47 #include "sync/protocol/sync.pb.h" 47 #include "sync/protocol/sync.pb.h"
48 #include "sync/util/experiments.h"
48 #include "sync/util/nigori.h" 49 #include "sync/util/nigori.h"
49 50
50 static const int kSaveChangesIntervalSeconds = 10; 51 static const int kSaveChangesIntervalSeconds = 10;
51 static const FilePath::CharType kSyncDataFolderName[] = 52 static const FilePath::CharType kSyncDataFolderName[] =
52 FILE_PATH_LITERAL("Sync Data"); 53 FILE_PATH_LITERAL("Sync Data");
53 54
54 typedef TokenService::TokenAvailableDetails TokenAvailableDetails; 55 typedef TokenService::TokenAvailableDetails TokenAvailableDetails;
55 56
56 typedef GoogleServiceAuthError AuthError; 57 typedef GoogleServiceAuthError AuthError;
57 58
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 this, &Core::SaveChanges); 1206 this, &Core::SaveChanges);
1206 } 1207 }
1207 1208
1208 void SyncBackendHost::Core::SaveChanges() { 1209 void SyncBackendHost::Core::SaveChanges() {
1209 DCHECK_EQ(MessageLoop::current(), sync_loop_); 1210 DCHECK_EQ(MessageLoop::current(), sync_loop_);
1210 sync_manager_->SaveChanges(); 1211 sync_manager_->SaveChanges();
1211 } 1212 }
1212 1213
1213 void SyncBackendHost::AddExperimentalTypes() { 1214 void SyncBackendHost::AddExperimentalTypes() {
1214 CHECK(initialized()); 1215 CHECK(initialized());
1215 syncable::ModelTypeSet to_add; 1216 Experiments experiments;
1216 if (core_->sync_manager()->ReceivedExperimentalTypes(&to_add)) 1217 if (core_->sync_manager()->ReceivedExperiment(&experiments))
1217 frontend_->OnDataTypesChanged(to_add); 1218 frontend_->OnExperimentsChanged(experiments);
1218 } 1219 }
1219 1220
1220 void SyncBackendHost::OnNigoriDownloadRetry() { 1221 void SyncBackendHost::OnNigoriDownloadRetry() {
1221 DCHECK_EQ(MessageLoop::current(), frontend_loop_); 1222 DCHECK_EQ(MessageLoop::current(), frontend_loop_);
1222 if (!frontend_) 1223 if (!frontend_)
1223 return; 1224 return;
1224 1225
1225 frontend_->OnSyncConfigureRetry(); 1226 frontend_->OnSyncConfigureRetry();
1226 } 1227 }
1227 1228
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 FROM_HERE, 1425 FROM_HERE,
1425 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, 1426 base::Bind(&SyncBackendHost::Core::DoRefreshNigori,
1426 core_.get(), sync_thread_done_callback)); 1427 core_.get(), sync_thread_done_callback));
1427 } 1428 }
1428 1429
1429 #undef SDVLOG 1430 #undef SDVLOG
1430 1431
1431 #undef SLOG 1432 #undef SLOG
1432 1433
1433 } // namespace browser_sync 1434 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/glue/sync_backend_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698