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

Side by Side Diff: chrome/browser/ui/webui/options/startup_pages_handler.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/webui/options/options_ui.h" 13 #include "chrome/browser/ui/webui/options/options_ui.h"
13 #include "components/omnibox/browser/autocomplete_controller_delegate.h" 14 #include "components/omnibox/browser/autocomplete_controller_delegate.h"
14 #include "components/prefs/pref_change_registrar.h" 15 #include "components/prefs/pref_change_registrar.h"
15 #include "components/prefs/pref_member.h" 16 #include "components/prefs/pref_member.h"
16 #include "ui/base/models/table_model_observer.h" 17 #include "ui/base/models/table_model_observer.h"
17 18
18 class AutocompleteController; 19 class AutocompleteController;
19 class CustomHomePagesTableModel; 20 class CustomHomePagesTableModel;
20 class TemplateURLService; 21 class TemplateURLService;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Gets autocomplete suggestions asychronously for the given string. 72 // Gets autocomplete suggestions asychronously for the given string.
72 // Called from WebUI. 73 // Called from WebUI.
73 void RequestAutocompleteSuggestions(const base::ListValue* args); 74 void RequestAutocompleteSuggestions(const base::ListValue* args);
74 75
75 // Loads the current set of custom startup pages and reports it to the WebUI. 76 // Loads the current set of custom startup pages and reports it to the WebUI.
76 void UpdateStartupPages(); 77 void UpdateStartupPages();
77 78
78 // Writes the current set of startup pages to prefs. 79 // Writes the current set of startup pages to prefs.
79 void SaveStartupPagesPref(); 80 void SaveStartupPagesPref();
80 81
81 scoped_ptr<AutocompleteController> autocomplete_controller_; 82 std::unique_ptr<AutocompleteController> autocomplete_controller_;
82 83
83 // Used to observe updates to the preference of the list of URLs to load 84 // Used to observe updates to the preference of the list of URLs to load
84 // on startup, which can be updated via sync. 85 // on startup, which can be updated via sync.
85 PrefChangeRegistrar pref_change_registrar_; 86 PrefChangeRegistrar pref_change_registrar_;
86 87
87 // The set of pages to launch on startup. 88 // The set of pages to launch on startup.
88 scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_; 89 std::unique_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler); 91 DISALLOW_COPY_AND_ASSIGN(StartupPagesHandler);
91 }; 92 };
92 93
93 } // namespace options 94 } // namespace options
94 95
95 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_ 96 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_STARTUP_PAGES_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698