| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ | 5 #ifndef CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ |
| 6 #define CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ | 6 #define CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/strings/string_split.h" |
| 15 #include "chrome/browser/prefs/session_startup_pref.h" | 16 #include "chrome/browser/prefs/session_startup_pref.h" |
| 16 #include "chrome/browser/profile_resetter/profile_resetter.h" | 17 #include "chrome/browser/profile_resetter/profile_resetter.h" |
| 17 | 18 |
| 18 namespace base { | 19 namespace base { |
| 19 class ListValue; | 20 class ListValue; |
| 20 } | 21 } |
| 21 | 22 |
| 22 // ResettableSettingsSnapshot captures some settings values at constructor. It | 23 // ResettableSettingsSnapshot captures some settings values at constructor. It |
| 23 // can calculate the difference between two snapshots. That is, modified fields. | 24 // can calculate the difference between two snapshots. That is, modified fields. |
| 24 class ResettableSettingsSnapshot { | 25 class ResettableSettingsSnapshot { |
| 25 public: | 26 public: |
| 26 // ExtensionList is a vector of pairs. The first component is the extension | 27 // ExtensionList is a vector of pairs. The first component is the extension |
| 27 // id, the second is the name. | 28 // id, the second is the name. |
| 28 typedef std::vector<std::pair<std::string, std::string> > ExtensionList; | 29 typedef base::StringPairs ExtensionList; |
| 29 // All types of settings handled by this class. | 30 // All types of settings handled by this class. |
| 30 enum Field { | 31 enum Field { |
| 31 STARTUP_MODE = 1 << 0, | 32 STARTUP_MODE = 1 << 0, |
| 32 HOMEPAGE = 1 << 1, | 33 HOMEPAGE = 1 << 1, |
| 33 DSE_URL = 1 << 2, | 34 DSE_URL = 1 << 2, |
| 34 EXTENSIONS = 1 << 3, | 35 EXTENSIONS = 1 << 3, |
| 35 SHORTCUTS = 1 << 4, | 36 SHORTCUTS = 1 << 4, |
| 36 | 37 |
| 37 ALL_FIELDS = STARTUP_MODE | HOMEPAGE | DSE_URL | EXTENSIONS | SHORTCUTS, | 38 ALL_FIELDS = STARTUP_MODE | HOMEPAGE | DSE_URL | EXTENSIONS | SHORTCUTS, |
| 38 }; | 39 }; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 Profile* profile, | 132 Profile* profile, |
| 132 SnapshotCaller caller); | 133 SnapshotCaller caller); |
| 133 | 134 |
| 134 // Returns list of key/value pairs for all available reported information | 135 // Returns list of key/value pairs for all available reported information |
| 135 // from the |profile| and some additional fields. | 136 // from the |profile| and some additional fields. |
| 136 scoped_ptr<base::ListValue> GetReadableFeedbackForSnapshot( | 137 scoped_ptr<base::ListValue> GetReadableFeedbackForSnapshot( |
| 137 Profile* profile, | 138 Profile* profile, |
| 138 const ResettableSettingsSnapshot& snapshot); | 139 const ResettableSettingsSnapshot& snapshot); |
| 139 | 140 |
| 140 #endif // CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ | 141 #endif // CHROME_BROWSER_PROFILE_RESETTER_RESETTABLE_SETTINGS_SNAPSHOT_H_ |
| OLD | NEW |