OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/extensions/api/sessions/sessions_api.h" | 5 #include "chrome/browser/extensions/api/sessions/sessions_api.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 if (!session_id) { | 569 if (!session_id) { |
570 SetInvalidIdError(*params->session_id); | 570 SetInvalidIdError(*params->session_id); |
571 return false; | 571 return false; |
572 } | 572 } |
573 | 573 |
574 return session_id->IsForeign() ? | 574 return session_id->IsForeign() ? |
575 RestoreForeignSession(*session_id, browser) | 575 RestoreForeignSession(*session_id, browser) |
576 : RestoreLocalSession(*session_id, browser); | 576 : RestoreLocalSession(*session_id, browser); |
577 } | 577 } |
578 | 578 |
579 SessionsAPI::SessionsAPI(Profile* profile) { | |
580 } | |
581 | |
582 SessionsAPI::~SessionsAPI() { | |
583 } | |
584 | |
585 static base::LazyInstance<ProfileKeyedAPIFactory<SessionsAPI> > | |
586 g_factory = LAZY_INSTANCE_INITIALIZER; | |
587 | |
588 // static | |
589 ProfileKeyedAPIFactory<SessionsAPI>* | |
590 SessionsAPI::GetFactoryInstance() { | |
591 return g_factory.Pointer(); | |
592 } | |
593 | |
594 } // namespace extensions | 579 } // namespace extensions |
OLD | NEW |