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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 const syncer::SyncDataList& initial_sync_data, | 285 const syncer::SyncDataList& initial_sync_data, |
286 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 286 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
287 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; | 287 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; |
288 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 288 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; |
289 | 289 |
290 // Processes a local TemplateURL change for Sync. |turl| is the TemplateURL | 290 // Processes a local TemplateURL change for Sync. |turl| is the TemplateURL |
291 // that has been modified, and |type| is the Sync ChangeType that took place. | 291 // that has been modified, and |type| is the Sync ChangeType that took place. |
292 // This may send a new SyncChange to the cloud. If our model has not yet been | 292 // This may send a new SyncChange to the cloud. If our model has not yet been |
293 // associated with Sync, or if this is triggered by a Sync change, then this | 293 // associated with Sync, or if this is triggered by a Sync change, then this |
294 // does nothing. | 294 // does nothing. |
295 void ProcessTemplateURLChange(const TemplateURL* turl, | 295 void ProcessTemplateURLChange(const tracked_objects::Location& from_here, |
| 296 const TemplateURL* turl, |
296 syncer::SyncChange::SyncChangeType type); | 297 syncer::SyncChange::SyncChangeType type); |
297 | 298 |
298 Profile* profile() const { return profile_; } | 299 Profile* profile() const { return profile_; } |
299 | 300 |
300 // Returns a SyncData with a sync representation of the search engine data | 301 // Returns a SyncData with a sync representation of the search engine data |
301 // from |turl|. | 302 // from |turl|. |
302 static syncer::SyncData CreateSyncDataFromTemplateURL( | 303 static syncer::SyncData CreateSyncDataFromTemplateURL( |
303 const TemplateURL& turl); | 304 const TemplateURL& turl); |
304 | 305 |
305 // Creates a new heap-allocated TemplateURL* which is populated by overlaying | 306 // Creates a new heap-allocated TemplateURL* which is populated by overlaying |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 | 681 |
681 // This is used to log the origin of changes to the default search provider. | 682 // This is used to log the origin of changes to the default search provider. |
682 // We set this value to increasingly specific values when we know what is the | 683 // We set this value to increasingly specific values when we know what is the |
683 // cause/origin of a default search change. | 684 // cause/origin of a default search change. |
684 DefaultSearchChangeOrigin dsp_change_origin_; | 685 DefaultSearchChangeOrigin dsp_change_origin_; |
685 | 686 |
686 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 687 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
687 }; | 688 }; |
688 | 689 |
689 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 690 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
OLD | NEW |