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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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) 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/file_util.h" 8 #include "base/file_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 scheme_whitelist_(scheme_whitelist), 66 scheme_whitelist_(scheme_whitelist),
67 succeeded_(false) { 67 succeeded_(false) {
68 } 68 }
69 69
70 bool InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask::RunOnDBThread( 70 bool InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask::RunOnDBThread(
71 HistoryBackend* backend, 71 HistoryBackend* backend,
72 HistoryDatabase* db) { 72 HistoryDatabase* db) {
73 data_ = URLIndexPrivateData::RebuildFromHistory(db, languages_, 73 data_ = URLIndexPrivateData::RebuildFromHistory(db, languages_,
74 scheme_whitelist_); 74 scheme_whitelist_);
75 succeeded_ = data_.get() && !data_->Empty(); 75 succeeded_ = data_.get() && !data_->Empty();
76 if (!succeeded_ && data_) 76 if (!succeeded_ && data_.get())
77 data_->Clear(); 77 data_->Clear();
78 return true; 78 return true;
79 } 79 }
80 80
81 void InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask:: 81 void InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask::
82 DoneRunOnMainThread() { 82 DoneRunOnMainThread() {
83 index_->DoneRebuidingPrivateDataFromHistoryDB(succeeded_, data_); 83 index_->DoneRebuidingPrivateDataFromHistoryDB(succeeded_, data_);
84 } 84 }
85 85
86 InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask:: 86 InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask::
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 base::Bind(DeleteCacheFile, path)); 339 base::Bind(DeleteCacheFile, path));
340 } 340 }
341 } 341 }
342 342
343 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) { 343 void InMemoryURLIndex::OnCacheSaveDone(bool succeeded) {
344 if (save_cache_observer_) 344 if (save_cache_observer_)
345 save_cache_observer_->OnCacheSaveFinished(succeeded); 345 save_cache_observer_->OnCacheSaveFinished(succeeded);
346 } 346 }
347 347
348 } // namespace history 348 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_unittest.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