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

Side by Side Diff: webkit/glue/media/media_resource_loader_bridge_factory.cc

Issue 3404027: webkit: Append base:: in the StringPrintf calls. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 months 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
OLDNEW
1 // Copyright (c) 2009 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 "webkit/glue/media/media_resource_loader_bridge_factory.h" 5 #include "webkit/glue/media/media_resource_loader_bridge_factory.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h"
9 10
10 namespace { 11 namespace {
11 12
12 // A constant for an unknown position. 13 // A constant for an unknown position.
13 const int64 kPositionNotSpecified = -1; 14 const int64 kPositionNotSpecified = -1;
14 15
15 } // namespace 16 } // namespace
16 17
17 namespace webkit_glue { 18 namespace webkit_glue {
18 19
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 55 }
55 56
56 // static 57 // static
57 const std::string MediaResourceLoaderBridgeFactory::GenerateHeaders ( 58 const std::string MediaResourceLoaderBridgeFactory::GenerateHeaders (
58 int64 first_byte_position, int64 last_byte_position) { 59 int64 first_byte_position, int64 last_byte_position) {
59 // Construct the range header. 60 // Construct the range header.
60 std::string header; 61 std::string header;
61 if (first_byte_position > kPositionNotSpecified && 62 if (first_byte_position > kPositionNotSpecified &&
62 last_byte_position > kPositionNotSpecified) { 63 last_byte_position > kPositionNotSpecified) {
63 if (first_byte_position <= last_byte_position) { 64 if (first_byte_position <= last_byte_position) {
64 header = StringPrintf("Range: bytes=%" PRId64 "-%" PRId64, 65 header = base::StringPrintf("Range: bytes=%" PRId64 "-%" PRId64,
65 first_byte_position, 66 first_byte_position,
66 last_byte_position); 67 last_byte_position);
67 } 68 }
68 } else if (first_byte_position > kPositionNotSpecified) { 69 } else if (first_byte_position > kPositionNotSpecified) {
69 header = StringPrintf("Range: bytes=%" PRId64 "-", first_byte_position); 70 header = base::StringPrintf("Range: bytes=%" PRId64 "-",
71 first_byte_position);
70 } else if (last_byte_position > kPositionNotSpecified) { 72 } else if (last_byte_position > kPositionNotSpecified) {
71 NOTIMPLEMENTED() << "Suffix range not implemented"; 73 NOTIMPLEMENTED() << "Suffix range not implemented";
72 } 74 }
73 return header; 75 return header;
74 } 76 }
75 77
76 } // namespace webkit_glue 78 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_data_source_unittest.cc ('k') | webkit/glue/plugins/test/plugin_arguments_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698