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

Side by Side Diff: ui/app_list/search/history.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/app_list/search/history.h ('k') | ui/app_list/search/history_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ui/app_list/search/history.h" 5 #include "ui/app_list/search/history.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool History::IsReady() const { 42 bool History::IsReady() const {
43 return data_loaded_; 43 return data_loaded_;
44 } 44 }
45 45
46 void History::AddLaunchEvent(const std::string& query, 46 void History::AddLaunchEvent(const std::string& query,
47 const std::string& result_id) { 47 const std::string& result_id) {
48 DCHECK(IsReady()); 48 DCHECK(IsReady());
49 data_->Add(NormalizeString(query), result_id); 49 data_->Add(NormalizeString(query), result_id);
50 } 50 }
51 51
52 scoped_ptr<KnownResults> History::GetKnownResults( 52 std::unique_ptr<KnownResults> History::GetKnownResults(
53 const std::string& query) const { 53 const std::string& query) const {
54 DCHECK(IsReady()); 54 DCHECK(IsReady());
55 return data_->GetKnownResults(NormalizeString(query)); 55 return data_->GetKnownResults(NormalizeString(query));
56 } 56 }
57 57
58 void History::OnHistoryDataLoadedFromStore() { 58 void History::OnHistoryDataLoadedFromStore() {
59 data_loaded_ = true; 59 data_loaded_ = true;
60 } 60 }
61 61
62 } // namespace app_list 62 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search/history.h ('k') | ui/app_list/search/history_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698