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

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

Issue 1148203002: Fix crash when logging in with an open uber page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 500? Created 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SessionID::id_type window_num); 51 SessionID::id_type window_num);
52 52
53 // Helper method to create JSON compatible objects from Session objects. 53 // Helper method to create JSON compatible objects from Session objects.
54 static bool SessionTabToValue(const ::sessions::SessionTab& tab, 54 static bool SessionTabToValue(const ::sessions::SessionTab& tab,
55 base::DictionaryValue* dictionary); 55 base::DictionaryValue* dictionary);
56 56
57 // Returns a pointer to the current session model associator or NULL. 57 // Returns a pointer to the current session model associator or NULL.
58 static OpenTabsUIDelegate* GetOpenTabsUIDelegate(content::WebUI* web_ui); 58 static OpenTabsUIDelegate* GetOpenTabsUIDelegate(content::WebUI* web_ui);
59 59
60 private: 60 private:
61 // Used to register ForeignSessionHandler for notifications.
62 void Init();
63
64 // Determines how ForeignSessionHandler will interact with the new tab page. 61 // Determines how ForeignSessionHandler will interact with the new tab page.
65 void Observe(int type, 62 void Observe(int type,
66 const content::NotificationSource& source, 63 const content::NotificationSource& source,
67 const content::NotificationDetails& details) override; 64 const content::NotificationDetails& details) override;
68 65
69 // Returns true if tab sync is enabled for this profile, otherwise false. 66 // Returns true if tab sync is enabled for this profile, otherwise false.
70 bool IsTabSyncEnabled(); 67 bool IsTabSyncEnabled();
71 68
72 // Returns a string used to show the user when a session was last modified. 69 // Returns a string used to show the user when a session was last modified.
73 base::string16 FormatSessionTime(const base::Time& time); 70 base::string16 FormatSessionTime(const base::Time& time);
(...skipping 22 matching lines...) Expand all
96 93
97 // The Registrar used to register ForeignSessionHandler for notifications. 94 // The Registrar used to register ForeignSessionHandler for notifications.
98 content::NotificationRegistrar registrar_; 95 content::NotificationRegistrar registrar_;
99 96
100 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler); 97 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler);
101 }; 98 };
102 99
103 } // namespace browser_sync 100 } // namespace browser_sync
104 101
105 #endif // CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ 102 #endif // CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698