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

Unified Diff: chrome/browser/profile_resetter/automatic_profile_resetter_mementos.cc

Issue 27030002: Added collecting of data to be fed to the JTL interpreter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profile_resetter/automatic_profile_resetter_mementos.cc
diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_mementos.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_mementos.cc
index 84524b9c0793e777c2ca6f9a8ce2d72a4a0402bc..d1e35dd676bd6dd58909fe512e080a5720c8b903 100644
--- a/chrome/browser/profile_resetter/automatic_profile_resetter_mementos.cc
+++ b/chrome/browser/profile_resetter/automatic_profile_resetter_mementos.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/profile_resetter/automatic_profile_resetter_mementos.h"
+#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
@@ -19,10 +20,12 @@
using base::DictionaryValue;
+
// AutomaticProfileResetter::PreferenceHostedPromptMemento -------------------
PreferenceHostedPromptMemento::PreferenceHostedPromptMemento(Profile* profile)
: profile_(profile) {}
+
PreferenceHostedPromptMemento::~PreferenceHostedPromptMemento() {}
std::string PreferenceHostedPromptMemento::ReadValue() const {
@@ -37,10 +40,12 @@ void PreferenceHostedPromptMemento::StoreValue(const std::string& value) {
prefs->SetString(prefs::kProfileResetPromptMemento, value);
}
+
// AutomaticProfileResetter::LocalStateHostedPromptMemento -------------------
LocalStateHostedPromptMemento::LocalStateHostedPromptMemento(Profile* profile)
: profile_(profile) {}
+
LocalStateHostedPromptMemento::~LocalStateHostedPromptMemento() {}
std::string LocalStateHostedPromptMemento::ReadValue() const {
@@ -52,12 +57,11 @@ std::string LocalStateHostedPromptMemento::ReadValue() const {
std::string profile_key = GetProfileKey();
if (!prompt_shown_dict || profile_key.empty()) {
NOTREACHED();
- return "";
+ return std::string();
}
std::string value;
- return prompt_shown_dict->GetStringWithoutPathExpansion(profile_key, &value)
- ? value
- : "";
+ return prompt_shown_dict->GetStringWithoutPathExpansion(profile_key, &value) ?
+ value : std::string();
}
void LocalStateHostedPromptMemento::StoreValue(const std::string& value) {
@@ -79,10 +83,12 @@ std::string LocalStateHostedPromptMemento::GetProfileKey() const {
return profile_->GetPath().BaseName().MaybeAsASCII();
}
+
// AutomaticProfileResetter::FileHostedPromptMemento -------------------------
FileHostedPromptMemento::FileHostedPromptMemento(Profile* profile)
: profile_(profile) {}
+
FileHostedPromptMemento::~FileHostedPromptMemento() {}
void FileHostedPromptMemento::ReadValue(

Powered by Google App Engine
This is Rietveld 408576698