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/ui/webui/local_discovery/local_discovery_ui_handler.h" | 5 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/local_discovery/privet_device_lister_impl.h" | 10 #include "chrome/browser/local_discovery/privet_device_lister_impl.h" |
11 #include "chrome/browser/local_discovery/privet_http_impl.h" | 11 #include "chrome/browser/local_discovery/privet_http_impl.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 13 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
15 #include "chrome/browser/signin/signin_manager.h" | 15 #include "chrome/browser/signin/signin_manager.h" |
16 #include "chrome/browser/signin/signin_manager_base.h" | 16 #include "chrome/browser/signin/signin_manager_base.h" |
17 #include "chrome/browser/signin/signin_manager_factory.h" | 17 #include "chrome/browser/signin/signin_manager_factory.h" |
18 #include "content/public/browser/web_ui.h" | 18 #include "content/public/browser/web_ui.h" |
19 #include "net/base/host_port_pair.h" | 19 #include "net/base/host_port_pair.h" |
20 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
21 #include "net/http/http_status_code.h" | 21 #include "net/http/http_status_code.h" |
22 | 22 |
23 namespace local_discovery { | 23 namespace local_discovery { |
24 | 24 |
25 namespace { | 25 namespace { |
26 // TODO(noamsml): This is a temporary shim until automated_url is in the | 26 // TODO(noamsml): This is a temporary shim until automated_url is in the |
27 // response. | 27 // response. |
28 const char kPrivetAutomatedClaimURLFormat[] = "%s/confirm?token=%s"; | 28 const char kPrivetAutomatedClaimURLFormat[] = "%s/confirm?token=%s"; |
29 const int kAccountIndexUseOAuth2 = -1; | |
30 | 29 |
31 LocalDiscoveryUIHandler::Factory* g_factory = NULL; | 30 LocalDiscoveryUIHandler::Factory* g_factory = NULL; |
32 int g_num_visible = 0; | 31 int g_num_visible = 0; |
33 } // namespace | 32 } // namespace |
34 | 33 |
35 LocalDiscoveryUIHandler::LocalDiscoveryUIHandler() : is_visible_(false) { | 34 LocalDiscoveryUIHandler::LocalDiscoveryUIHandler() : is_visible_(false) { |
36 } | 35 } |
37 | 36 |
38 LocalDiscoveryUIHandler::LocalDiscoveryUIHandler( | 37 LocalDiscoveryUIHandler::LocalDiscoveryUIHandler( |
39 scoped_ptr<PrivetDeviceLister> privet_lister) { | 38 scoped_ptr<PrivetDeviceLister> privet_lister) { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 370 |
372 confirm_api_call_flow_.reset(); | 371 confirm_api_call_flow_.reset(); |
373 privet_resolution_.reset(); | 372 privet_resolution_.reset(); |
374 cloud_print_account_manager_.reset(); | 373 cloud_print_account_manager_.reset(); |
375 xsrf_token_for_primary_user_.clear(); | 374 xsrf_token_for_primary_user_.clear(); |
376 current_register_user_index_ = 0; | 375 current_register_user_index_ = 0; |
377 current_http_client_.reset(); | 376 current_http_client_.reset(); |
378 } | 377 } |
379 | 378 |
380 } // namespace local_discovery | 379 } // namespace local_discovery |
OLD | NEW |