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

Side by Side Diff: components/history/core/browser/delete_directive_handler.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
OLDNEW
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 #include <utility> 9 #include <utility>
9 10
10 #include "base/json/json_writer.h" 11 #include "base/json/json_writer.h"
11 #include "base/rand_util.h" 12 #include "base/rand_util.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "components/history/core/browser/history_backend.h" 15 #include "components/history/core/browser/history_backend.h"
15 #include "components/history/core/browser/history_db_task.h" 16 #include "components/history/core/browser/history_db_task.h"
16 #include "components/history/core/browser/history_service.h" 17 #include "components/history/core/browser/history_service.h"
17 #include "sync/api/sync_change.h" 18 #include "components/sync/api/sync_change.h"
18 #include "sync/protocol/history_delete_directive_specifics.pb.h" 19 #include "components/sync/protocol/history_delete_directive_specifics.pb.h"
19 #include "sync/protocol/proto_value_conversions.h" 20 #include "components/sync/protocol/proto_value_conversions.h"
20 #include "sync/protocol/sync.pb.h" 21 #include "components/sync/protocol/sync.pb.h"
21 22
22 namespace { 23 namespace {
23 24
24 std::string RandASCIIString(size_t length) { 25 std::string RandASCIIString(size_t length) {
25 std::string result; 26 std::string result;
26 const int kMin = static_cast<int>(' '); 27 const int kMin = static_cast<int>(' ');
27 const int kMax = static_cast<int>('~'); 28 const int kMax = static_cast<int>('~');
28 for (size_t i = 0; i < length; ++i) 29 for (size_t i = 0; i < length; ++i)
29 result.push_back(static_cast<char>(base::RandInt(kMin, kMax))); 30 result.push_back(static_cast<char>(base::RandInt(kMin, kMax)));
30 return result; 31 return result;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 syncer::SyncChangeList change_list; 427 syncer::SyncChangeList change_list;
427 for (size_t i = 0; i < delete_directives.size(); ++i) { 428 for (size_t i = 0; i < delete_directives.size(); ++i) {
428 change_list.push_back(syncer::SyncChange( 429 change_list.push_back(syncer::SyncChange(
429 FROM_HERE, syncer::SyncChange::ACTION_DELETE, delete_directives[i])); 430 FROM_HERE, syncer::SyncChange::ACTION_DELETE, delete_directives[i]));
430 } 431 }
431 sync_processor_->ProcessSyncChanges(FROM_HERE, change_list); 432 sync_processor_->ProcessSyncChanges(FROM_HERE, change_list);
432 } 433 }
433 } 434 }
434 435
435 } // namespace history 436 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/delete_directive_handler.h ('k') | components/history/core/browser/history_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698