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

Side by Side Diff: chrome/browser/ui/webui/snippets_internals_message_handler.h

Issue 1907233002: Allows to dump current snippets to a json in the Downloads folder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After code review #2 Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 19 matching lines...) Expand all
30 void RegisterMessages() override; 30 void RegisterMessages() override;
31 31
32 // ntp_snippets::NTPSnippetsServiceObserver: 32 // ntp_snippets::NTPSnippetsServiceObserver:
33 // Send everytime the service loads a new set of data. 33 // Send everytime the service loads a new set of data.
34 void NTPSnippetsServiceLoaded() override; 34 void NTPSnippetsServiceLoaded() override;
35 // Send when the service is shutting down. 35 // Send when the service is shutting down.
36 void NTPSnippetsServiceShutdown() override; 36 void NTPSnippetsServiceShutdown() override;
37 37
38 void HandleLoaded(const base::ListValue* args); 38 void HandleLoaded(const base::ListValue* args);
39 void HandleClear(const base::ListValue* args); 39 void HandleClear(const base::ListValue* args);
40 void HandleDump(const base::ListValue* args);
40 void HandleClearDiscarded(const base::ListValue* args); 41 void HandleClearDiscarded(const base::ListValue* args);
41 void HandleDownload(const base::ListValue* args); 42 void HandleDownload(const base::ListValue* args);
42 43
43 void SendInitialData(); 44 void SendInitialData();
44 void SendSnippets(); 45 void SendSnippets();
45 void SendDiscardedSnippets(); 46 void SendDiscardedSnippets();
46 void SendHosts(); 47 void SendHosts();
47 void SendJson(const std::string& json); 48 void SendJson(const std::string& json);
48 void SendBoolean(const std::string& name, bool value); 49 void SendBoolean(const std::string& name, bool value);
49 void SendString(const std::string& name, const std::string& value); 50 void SendString(const std::string& name, const std::string& value);
50 51
51 ScopedObserver<ntp_snippets::NTPSnippetsService, 52 ScopedObserver<ntp_snippets::NTPSnippetsService,
52 ntp_snippets::NTPSnippetsServiceObserver> observer_; 53 ntp_snippets::NTPSnippetsServiceObserver> observer_;
53 bool dom_loaded_; 54 bool dom_loaded_;
54 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; 55 ntp_snippets::NTPSnippetsService* ntp_snippets_service_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler); 57 DISALLOW_COPY_AND_ASSIGN(SnippetsInternalsMessageHandler);
57 }; 58 };
58 59
59 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_ 60 #endif // CHROME_BROWSER_UI_WEBUI_SNIPPETS_INTERNALS_MESSAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/snippets_internals.js ('k') | chrome/browser/ui/webui/snippets_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698