OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "components/history/core/browser/delete_directive_handler.h" | 5 #include "components/history/core/browser/delete_directive_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "components/history/core/browser/history_backend.h" | 15 #include "components/history/core/browser/history_backend.h" |
16 #include "components/history/core/browser/history_db_task.h" | 16 #include "components/history/core/browser/history_db_task.h" |
17 #include "components/history/core/browser/history_service.h" | 17 #include "components/history/core/browser/history_service.h" |
18 #include "components/sync/api/sync_change.h" | 18 #include "components/sync/model/sync_change.h" |
19 #include "components/sync/protocol/history_delete_directive_specifics.pb.h" | 19 #include "components/sync/protocol/history_delete_directive_specifics.pb.h" |
20 #include "components/sync/protocol/proto_value_conversions.h" | 20 #include "components/sync/protocol/proto_value_conversions.h" |
21 #include "components/sync/protocol/sync.pb.h" | 21 #include "components/sync/protocol/sync.pb.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 std::string RandASCIIString(size_t length) { | 25 std::string RandASCIIString(size_t length) { |
26 std::string result; | 26 std::string result; |
27 const int kMin = static_cast<int>(' '); | 27 const int kMin = static_cast<int>(' '); |
28 const int kMax = static_cast<int>('~'); | 28 const int kMax = static_cast<int>('~'); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 syncer::SyncChangeList change_list; | 427 syncer::SyncChangeList change_list; |
428 for (size_t i = 0; i < delete_directives.size(); ++i) { | 428 for (size_t i = 0; i < delete_directives.size(); ++i) { |
429 change_list.push_back(syncer::SyncChange( | 429 change_list.push_back(syncer::SyncChange( |
430 FROM_HERE, syncer::SyncChange::ACTION_DELETE, delete_directives[i])); | 430 FROM_HERE, syncer::SyncChange::ACTION_DELETE, delete_directives[i])); |
431 } | 431 } |
432 sync_processor_->ProcessSyncChanges(FROM_HERE, change_list); | 432 sync_processor_->ProcessSyncChanges(FROM_HERE, change_list); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 } // namespace history | 436 } // namespace history |
OLD | NEW |