| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/extensions/api/dial/dial_api.h" | 5 #include "chrome/browser/extensions/api/dial/dial_api.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/extensions/api/dial/dial_api_factory.h" | 10 #include "chrome/browser/extensions/api/dial/dial_api_factory.h" |
| 11 #include "chrome/browser/extensions/extension_system.h" | |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/common/extensions/api/dial.h" | 12 #include "chrome/common/extensions/api/dial.h" |
| 14 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 15 #include "extensions/browser/event_router.h" | 14 #include "extensions/browser/event_router.h" |
| 15 #include "extensions/browser/extension_system.h" |
| 16 | 16 |
| 17 using base::TimeDelta; | 17 using base::TimeDelta; |
| 18 using content::BrowserThread; | 18 using content::BrowserThread; |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const char kDialServiceError[] = "Dial service error."; | 22 const char kDialServiceError[] = "Dial service error."; |
| 23 | 23 |
| 24 // How often to poll for devices. | 24 // How often to poll for devices. |
| 25 const int kDialRefreshIntervalSecs = 120; | 25 const int kDialRefreshIntervalSecs = 120; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 if (!result_) | 168 if (!result_) |
| 169 error_ = kDialServiceError; | 169 error_ = kDialServiceError; |
| 170 | 170 |
| 171 SetResult(new base::FundamentalValue(result_)); | 171 SetResult(new base::FundamentalValue(result_)); |
| 172 return true; | 172 return true; |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace api | 175 } // namespace api |
| 176 | 176 |
| 177 } // namespace extensions | 177 } // namespace extensions |
| OLD | NEW |