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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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) 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 "chrome/browser/history/in_memory_url_index.h" 5 #include "chrome/browser/history/in_memory_url_index.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } else { 303 } else {
304 ScheduleRebuildFromHistory(); 304 ScheduleRebuildFromHistory();
305 } 305 }
306 } 306 }
307 } 307 }
308 } 308 }
309 309
310 // Restoring from the History DB ----------------------------------------------- 310 // Restoring from the History DB -----------------------------------------------
311 311
312 void InMemoryURLIndex::ScheduleRebuildFromHistory() { 312 void InMemoryURLIndex::ScheduleRebuildFromHistory() {
313 HistoryService* service = 313 HistoryService* service = HistoryServiceFactory::GetForProfile(
314 HistoryServiceFactory::GetForProfile(profile_, 314 profile_, ServiceAccessType::EXPLICIT_ACCESS);
315 Profile::EXPLICIT_ACCESS);
316 service->ScheduleDBTask( 315 service->ScheduleDBTask(
317 scoped_ptr<history::HistoryDBTask>( 316 scoped_ptr<history::HistoryDBTask>(
318 new InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask( 317 new InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask(
319 this, languages_, scheme_whitelist_)), 318 this, languages_, scheme_whitelist_)),
320 &cache_reader_tracker_); 319 &cache_reader_tracker_);
321 } 320 }
322 321
323 void InMemoryURLIndex::DoneRebuidingPrivateDataFromHistoryDB( 322 void InMemoryURLIndex::DoneRebuidingPrivateDataFromHistoryDB(
324 bool succeeded, 323 bool succeeded,
325 scoped_refptr<URLIndexPrivateData> private_data) { 324 scoped_refptr<URLIndexPrivateData> private_data) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 base::Bind(DeleteCacheFile, path)); 369 base::Bind(DeleteCacheFile, path));
371 } 370 }
372 } 371 }
373 372
374 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) { 373 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) {
375 if (save_cache_observer_) 374 if (save_cache_observer_)
376 save_cache_observer_->OnCacheSaveFinished(succeeded); 375 save_cache_observer_->OnCacheSaveFinished(succeeded);
377 } 376 }
378 377
379 } // namespace history 378 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_tab_helper.cc ('k') | chrome/browser/history/in_memory_url_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698