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 #include "chrome/browser/ui/webui/foreign_session_handler.h" | 5 #include "chrome/browser/ui/webui/foreign_session_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 #include <utility> | 12 #include <utility> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/bind.h" | 15 #include "base/bind.h" |
15 #include "base/bind_helpers.h" | 16 #include "base/bind_helpers.h" |
16 #include "base/i18n/time_formatting.h" | 17 #include "base/i18n/time_formatting.h" |
17 #include "base/metrics/histogram_macros.h" | 18 #include "base/metrics/histogram_macros.h" |
18 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
19 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 // collapsed state persists. | 432 // collapsed state persists. |
432 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); | 433 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
433 DictionaryPrefUpdate update(prefs, prefs::kNtpCollapsedForeignSessions); | 434 DictionaryPrefUpdate update(prefs, prefs::kNtpCollapsedForeignSessions); |
434 if (is_collapsed) | 435 if (is_collapsed) |
435 update.Get()->SetBoolean(session_tag, true); | 436 update.Get()->SetBoolean(session_tag, true); |
436 else | 437 else |
437 update.Get()->Remove(session_tag, NULL); | 438 update.Get()->Remove(session_tag, NULL); |
438 } | 439 } |
439 | 440 |
440 } // namespace browser_sync | 441 } // namespace browser_sync |
OLD | NEW |