OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/policy/device_token_fetcher.h" | 5 #include "chrome/browser/policy/device_token_fetcher.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/browser/guid.h" | 11 #include "chrome/browser/guid.h" |
12 #include "chrome/browser/net/gaia/token_service.h" | 12 #include "chrome/browser/net/gaia/token_service.h" |
13 #include "chrome/browser/policy/proto/device_management_local.pb.h" | 13 #include "chrome/browser/policy/proto/device_management_local.pb.h" |
14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
16 #include "chrome/common/net/gaia/gaia_constants.h" | 16 #include "chrome/common/net/gaia/gaia_constants.h" |
17 #include "chrome/common/notification_details.h" | 17 #include "chrome/common/notification_details.h" |
18 #include "chrome/common/notification_service.h" | 18 #include "chrome/common/notification_service.h" |
19 #include "chrome/common/notification_source.h" | 19 #include "chrome/common/notification_source.h" |
20 #include "chrome/common/notification_type.h" | 20 #include "chrome/common/notification_type.h" |
21 | 21 |
22 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
23 #include "chrome/browser/chromeos/login/user_manager.h" | 23 #include "chrome/browser/chromeos/login/user_manager.h" |
24 #else | 24 #else |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 DCHECK(no_error); | 304 DCHECK(no_error); |
305 file_util::WriteFile(path, data.c_str(), data.length()); | 305 file_util::WriteFile(path, data.c_str(), data.length()); |
306 } | 306 } |
307 | 307 |
308 // static | 308 // static |
309 std::string DeviceTokenFetcher::GenerateNewDeviceID() { | 309 std::string DeviceTokenFetcher::GenerateNewDeviceID() { |
310 return guid::GenerateGUID(); | 310 return guid::GenerateGUID(); |
311 } | 311 } |
312 | 312 |
313 } // namespace policy | 313 } // namespace policy |
OLD | NEW |