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

Side by Side Diff: chrome/browser/history/delete_directive_handler.cc

Issue 15987009: Update chrome/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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) 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 "chrome/browser/history/delete_directive_handler.h" 5 #include "chrome/browser/history/delete_directive_handler.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 ProcessGlobalIdDeleteDirectives(backend, global_id_directives); 161 ProcessGlobalIdDeleteDirectives(backend, global_id_directives);
162 std::sort(time_range_directives.begin(), time_range_directives.end(), 162 std::sort(time_range_directives.begin(), time_range_directives.end(),
163 TimeRangeLessThan); 163 TimeRangeLessThan);
164 ProcessTimeRangeDeleteDirectives(backend, time_range_directives); 164 ProcessTimeRangeDeleteDirectives(backend, time_range_directives);
165 return true; 165 return true;
166 } 166 }
167 167
168 void DeleteDirectiveHandler::DeleteDirectiveTask::DoneRunOnMainThread() { 168 void DeleteDirectiveHandler::DeleteDirectiveTask::DoneRunOnMainThread() {
169 if (delete_directive_handler_) { 169 if (delete_directive_handler_.get()) {
170 delete_directive_handler_->FinishProcessing(post_processing_action_, 170 delete_directive_handler_->FinishProcessing(post_processing_action_,
171 delete_directives_); 171 delete_directives_);
172 } 172 }
173 } 173 }
174 174
175 void 175 void
176 DeleteDirectiveHandler::DeleteDirectiveTask::ProcessGlobalIdDeleteDirectives( 176 DeleteDirectiveHandler::DeleteDirectiveTask::ProcessGlobalIdDeleteDirectives(
177 history::HistoryBackend* history_backend, 177 history::HistoryBackend* history_backend,
178 const syncer::SyncDataList& global_id_directives) { 178 const syncer::SyncDataList& global_id_directives) {
179 if (global_id_directives.empty()) 179 if (global_id_directives.empty())
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 for (size_t i = 0; i < delete_directives.size(); ++i) { 416 for (size_t i = 0; i < delete_directives.size(); ++i) {
417 change_list.push_back( 417 change_list.push_back(
418 syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_DELETE, 418 syncer::SyncChange(FROM_HERE, syncer::SyncChange::ACTION_DELETE,
419 delete_directives[i])); 419 delete_directives[i]));
420 } 420 }
421 sync_processor_->ProcessSyncChanges(FROM_HERE, change_list); 421 sync_processor_->ProcessSyncChanges(FROM_HERE, change_list);
422 } 422 }
423 } 423 }
424 424
425 } // namespace history 425 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/operation_runner.cc ('k') | chrome/browser/importer/external_process_importer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698