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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/printing/cloud_print/cloud_print_proxy_service.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
6 6
7 #include <stack> 7 #include <stack>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/notifications/desktop_notification_service.h" 14 #include "chrome/browser/notifications/desktop_notification_service.h"
15 #include "chrome/browser/notifications/notification.h" 15 #include "chrome/browser/notifications/notification.h"
16 #include "chrome/browser/notifications/notification_ui_manager.h" 16 #include "chrome/browser/notifications/notification_ui_manager.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" 18 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/service/service_process_control.h" 20 #include "chrome/browser/service/service_process_control.h"
21 #include "chrome/browser/ui/browser_list.h" 21 #include "chrome/browser/ui/browser_list.h"
22 #include "chrome/common/cloud_print/cloud_print_proxy_info.h" 22 #include "chrome/common/cloud_print/cloud_print_proxy_info.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "chrome/common/service_messages.h" 24 #include "chrome/common/service_messages.h"
25 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
26 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 28
29 using content::BrowserThread;
30
29 // TODO(sanjeevr): Localize the product name? 31 // TODO(sanjeevr): Localize the product name?
30 const char kCloudPrintProductName[] = "Google Cloud Print"; 32 const char kCloudPrintProductName[] = "Google Cloud Print";
31 33
32 class CloudPrintProxyService::TokenExpiredNotificationDelegate 34 class CloudPrintProxyService::TokenExpiredNotificationDelegate
33 : public NotificationDelegate { 35 : public NotificationDelegate {
34 public: 36 public:
35 explicit TokenExpiredNotificationDelegate( 37 explicit TokenExpiredNotificationDelegate(
36 CloudPrintProxyService* cloud_print_service) 38 CloudPrintProxyService* cloud_print_service)
37 : cloud_print_service_(cloud_print_service) { 39 : cloud_print_service_(cloud_print_service) {
38 } 40 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 proxy_id_ = proxy_info.proxy_id; 206 proxy_id_ = proxy_info.proxy_id;
205 profile_->GetPrefs()->SetString( 207 profile_->GetPrefs()->SetString(
206 prefs::kCloudPrintEmail, 208 prefs::kCloudPrintEmail,
207 proxy_info.enabled ? proxy_info.email : std::string()); 209 proxy_info.enabled ? proxy_info.email : std::string());
208 } 210 }
209 211
210 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) { 212 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) {
211 ServiceProcessControl::GetInstance()->Launch(task, base::Closure()); 213 ServiceProcessControl::GetInstance()->Launch(task, base::Closure());
212 return true; 214 return true;
213 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/background_printing_manager.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698