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

Side by Side Diff: chrome/browser/sessions/chrome_tab_restore_service_client.cc

Issue 1331173002: Eliminate BaseSessionServiceDelegateImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@persistent_tab_restore_service_client
Patch Set: Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/sessions/chrome_tab_restore_service_client.h" 5 #include "chrome/browser/sessions/chrome_tab_restore_service_client.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/sessions/session_service.h" 8 #include "chrome/browser/sessions/session_service.h"
9 #include "chrome/browser/sessions/session_service_factory.h" 9 #include "chrome/browser/sessions/session_service_factory.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
11 #include "content/public/browser/browser_thread.h"
11 12
12 #if defined(ENABLE_EXTENSIONS) 13 #if defined(ENABLE_EXTENSIONS)
13 #include "chrome/common/extensions/extension_constants.h" 14 #include "chrome/common/extensions/extension_constants.h"
14 #include "chrome/common/extensions/extension_metrics.h" 15 #include "chrome/common/extensions/extension_metrics.h"
15 #include "extensions/browser/extension_registry.h" 16 #include "extensions/browser/extension_registry.h"
16 #include "extensions/common/extension.h" 17 #include "extensions/common/extension.h"
17 #include "extensions/common/extension_set.h" 18 #include "extensions/common/extension_set.h"
18 #endif 19 #endif
19 20
20 namespace { 21 namespace {
(...skipping 12 matching lines...) Expand all
33 #endif // defined(ENABLE_EXTENSIONS) 34 #endif // defined(ENABLE_EXTENSIONS)
34 } 35 }
35 36
36 } // namespace 37 } // namespace
37 38
38 ChromeTabRestoreServiceClient::ChromeTabRestoreServiceClient(Profile* profile) 39 ChromeTabRestoreServiceClient::ChromeTabRestoreServiceClient(Profile* profile)
39 : profile_(profile) {} 40 : profile_(profile) {}
40 41
41 ChromeTabRestoreServiceClient::~ChromeTabRestoreServiceClient() {} 42 ChromeTabRestoreServiceClient::~ChromeTabRestoreServiceClient() {}
42 43
44 bool ChromeTabRestoreServiceClient::ShouldTrackEntry(const GURL& url) {
45 return ::ShouldTrackEntry(url);
46 }
47
48 base::SequencedWorkerPool* ChromeTabRestoreServiceClient::GetBlockingPool() {
49 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
50 return content::BrowserThread::GetBlockingPool();
51 }
52
43 base::FilePath ChromeTabRestoreServiceClient::GetPathToSaveTo() { 53 base::FilePath ChromeTabRestoreServiceClient::GetPathToSaveTo() {
44 return profile_->GetPath(); 54 return profile_->GetPath();
45 } 55 }
46 56
47 GURL ChromeTabRestoreServiceClient::GetNewTabURL() { 57 GURL ChromeTabRestoreServiceClient::GetNewTabURL() {
48 return GURL(chrome::kChromeUINewTabURL); 58 return GURL(chrome::kChromeUINewTabURL);
49 } 59 }
50 60
51 bool ChromeTabRestoreServiceClient::HasLastSession() { 61 bool ChromeTabRestoreServiceClient::HasLastSession() {
52 #if defined(ENABLE_SESSION_SERVICE) 62 #if defined(ENABLE_SESSION_SERVICE)
(...skipping 18 matching lines...) Expand all
71 DCHECK(HasLastSession()); 81 DCHECK(HasLastSession());
72 #if defined(ENABLE_SESSION_SERVICE) 82 #if defined(ENABLE_SESSION_SERVICE)
73 SessionServiceFactory::GetForProfile(profile_) 83 SessionServiceFactory::GetForProfile(profile_)
74 ->GetLastSession(callback, tracker); 84 ->GetLastSession(callback, tracker);
75 #endif 85 #endif
76 } 86 }
77 87
78 void ChromeTabRestoreServiceClient::OnTabRestored(const GURL& url) { 88 void ChromeTabRestoreServiceClient::OnTabRestored(const GURL& url) {
79 RecordAppLaunch(profile_, url); 89 RecordAppLaunch(profile_, url);
80 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698