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

Side by Side Diff: chrome/browser/policy/device_token_fetcher.cc

Issue 5849001: Move GUID utils to src/chrome/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years 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) 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/guid.h"
8 #include "base/path_service.h" 9 #include "base/path_service.h"
9 #include "base/singleton.h" 10 #include "base/singleton.h"
10 #include "base/string_util.h" 11 #include "base/string_util.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/profiles/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
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 device_credentials.set_device_token(device_token); 327 device_credentials.set_device_token(device_token);
328 device_credentials.set_device_id(device_id); 328 device_credentials.set_device_id(device_id);
329 std::string data; 329 std::string data;
330 bool no_error = device_credentials.SerializeToString(&data); 330 bool no_error = device_credentials.SerializeToString(&data);
331 DCHECK(no_error); 331 DCHECK(no_error);
332 file_util::WriteFile(path, data.c_str(), data.length()); 332 file_util::WriteFile(path, data.c_str(), data.length());
333 } 333 }
334 334
335 // static 335 // static
336 std::string DeviceTokenFetcher::GenerateNewDeviceID() { 336 std::string DeviceTokenFetcher::GenerateNewDeviceID() {
337 return guid::GenerateGUID(); 337 return base::GenerateGUID();
338 } 338 }
339 339
340 } // namespace policy 340 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698