OLD | NEW |
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_COOKIES_VIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_COOKIES_VIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_COOKIES_VIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_COOKIES_VIEW_HANDLER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "chrome/browser/browsing_data/cookies_tree_model.h" | 12 #include "chrome/browser/browsing_data/cookies_tree_model.h" |
12 #include "chrome/browser/ui/webui/options/options_ui.h" | 13 #include "chrome/browser/ui/webui/options/options_ui.h" |
13 | 14 |
14 class CookiesTreeModelUtil; | 15 class CookiesTreeModelUtil; |
15 | 16 |
16 namespace options { | 17 namespace options { |
17 | 18 |
18 class CookiesViewHandler : public OptionsPageUIHandler, | 19 class CookiesViewHandler : public OptionsPageUIHandler, |
19 public CookiesTreeModel::Observer { | 20 public CookiesTreeModel::Observer { |
20 public: | 21 public: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 59 |
59 // Get children nodes data and pass it to 'CookiesView.loadChildren' to | 60 // Get children nodes data and pass it to 'CookiesView.loadChildren' to |
60 // update the WebUI. | 61 // update the WebUI. |
61 void SendChildren(const CookieTreeNode* parent); | 62 void SendChildren(const CookieTreeNode* parent); |
62 | 63 |
63 // Reloads the CookiesTreeModel and passes the nodes to | 64 // Reloads the CookiesTreeModel and passes the nodes to |
64 // 'CookiesView.loadChildren' to update the WebUI. | 65 // 'CookiesView.loadChildren' to update the WebUI. |
65 void ReloadCookies(const base::ListValue* args); | 66 void ReloadCookies(const base::ListValue* args); |
66 | 67 |
67 // The Cookies Tree model | 68 // The Cookies Tree model |
68 scoped_ptr<CookiesTreeModel> cookies_tree_model_; | 69 std::unique_ptr<CookiesTreeModel> cookies_tree_model_; |
69 | 70 |
70 // Flag to indicate whether there is a batch update in progress. | 71 // Flag to indicate whether there is a batch update in progress. |
71 bool batch_update_; | 72 bool batch_update_; |
72 | 73 |
73 scoped_ptr<CookiesTreeModelUtil> model_util_; | 74 std::unique_ptr<CookiesTreeModelUtil> model_util_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(CookiesViewHandler); | 76 DISALLOW_COPY_AND_ASSIGN(CookiesViewHandler); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace options | 79 } // namespace options |
79 | 80 |
80 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_COOKIES_VIEW_HANDLER_H_ | 81 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_COOKIES_VIEW_HANDLER_H_ |
OLD | NEW |