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

Side by Side Diff: chrome/browser/ui/webui/ntp/foreign_session_handler.cc

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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/ntp/foreign_session_handler.h" 5 #include "chrome/browser/ui/webui/ntp/foreign_session_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool SortSessionsByRecency(const SyncedSession* s1, const SyncedSession* s2) { 51 bool SortSessionsByRecency(const SyncedSession* s1, const SyncedSession* s2) {
52 return s1->modified_time > s2->modified_time; 52 return s1->modified_time > s2->modified_time;
53 } 53 }
54 54
55 } // namepace 55 } // namepace
56 56
57 ForeignSessionHandler::ForeignSessionHandler() { 57 ForeignSessionHandler::ForeignSessionHandler() {
58 } 58 }
59 59
60 // static 60 // static
61 void ForeignSessionHandler::RegisterUserPrefs( 61 void ForeignSessionHandler::RegisterProfilePrefs(
62 user_prefs::PrefRegistrySyncable* registry) { 62 user_prefs::PrefRegistrySyncable* registry) {
63 registry->RegisterDictionaryPref( 63 registry->RegisterDictionaryPref(
64 prefs::kNtpCollapsedForeignSessions, 64 prefs::kNtpCollapsedForeignSessions,
65 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 65 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
66 } 66 }
67 67
68 // static 68 // static
69 void ForeignSessionHandler::OpenForeignSessionTab( 69 void ForeignSessionHandler::OpenForeignSessionTab(
70 content::WebUI* web_ui, 70 content::WebUI* web_ui,
71 const std::string& session_string_value, 71 const std::string& session_string_value,
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 dictionary->SetString("userVisibleTimestamp", 405 dictionary->SetString("userVisibleTimestamp",
406 last_synced < base::TimeDelta::FromMinutes(1) ? 406 last_synced < base::TimeDelta::FromMinutes(1) ?
407 l10n_util::GetStringUTF16(IDS_SYNC_TIME_JUST_NOW) : 407 l10n_util::GetStringUTF16(IDS_SYNC_TIME_JUST_NOW) :
408 TimeFormat::TimeElapsed(last_synced)); 408 TimeFormat::TimeElapsed(last_synced));
409 dictionary->SetInteger("sessionId", window.window_id.id()); 409 dictionary->SetInteger("sessionId", window.window_id.id());
410 dictionary->Set("tabs", tab_values.release()); 410 dictionary->Set("tabs", tab_values.release());
411 return true; 411 return true;
412 } 412 }
413 413
414 } // namespace browser_sync 414 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/foreign_session_handler.h ('k') | chrome/browser/ui/webui/ntp/most_visited_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698