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 "storage/browser/fileapi/isolated_context.h" | 5 #include "storage/browser/fileapi/isolated_context.h" |
6 | 6 |
7 #include "base/basictypes.h" | |
8 #include "base/files/file_path.h" | |
9 #include "base/logging.h" | 7 #include "base/logging.h" |
10 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
11 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
12 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
14 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
15 #include "storage/browser/fileapi/file_system_url.h" | 13 #include "storage/browser/fileapi/file_system_url.h" |
16 | 14 |
17 namespace storage { | 15 namespace storage { |
18 | 16 |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 uint32 random_data[4]; | 473 uint32 random_data[4]; |
476 std::string id; | 474 std::string id; |
477 do { | 475 do { |
478 base::RandBytes(random_data, sizeof(random_data)); | 476 base::RandBytes(random_data, sizeof(random_data)); |
479 id = base::HexEncode(random_data, sizeof(random_data)); | 477 id = base::HexEncode(random_data, sizeof(random_data)); |
480 } while (instance_map_.find(id) != instance_map_.end()); | 478 } while (instance_map_.find(id) != instance_map_.end()); |
481 return id; | 479 return id; |
482 } | 480 } |
483 | 481 |
484 } // namespace storage | 482 } // namespace storage |
OLD | NEW |