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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_private_api.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/feedback_private/feedback_private_api.h" 5 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/statistics_recorder.h" 9 #include "base/metrics/statistics_recorder.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 13 matching lines...) Expand all
24 #include "url/url_util.h" 24 #include "url/url_util.h"
25 25
26 using feedback::FeedbackData; 26 using feedback::FeedbackData;
27 27
28 namespace { 28 namespace {
29 29
30 // Getting the filename of a blob prepends a "C:\fakepath" to the filename. 30 // Getting the filename of a blob prepends a "C:\fakepath" to the filename.
31 // This is undesirable, strip it if it exists. 31 // This is undesirable, strip it if it exists.
32 std::string StripFakepath(const std::string& path) { 32 std::string StripFakepath(const std::string& path) {
33 const char kFakePathStr[] = "C:\\fakepath\\"; 33 const char kFakePathStr[] = "C:\\fakepath\\";
34 if (StartsWithASCII(path, kFakePathStr, false)) 34 if (base::StartsWithASCII(path, kFakePathStr, false))
35 return path.substr(arraysize(kFakePathStr) - 1); 35 return path.substr(arraysize(kFakePathStr) - 1);
36 return path; 36 return path;
37 } 37 }
38 38
39 } // namespace 39 } // namespace
40 40
41 namespace extensions { 41 namespace extensions {
42 42
43 namespace feedback_private = api::feedback_private; 43 namespace feedback_private = api::feedback_private;
44 44
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 void FeedbackPrivateSendFeedbackFunction::OnCompleted( 236 void FeedbackPrivateSendFeedbackFunction::OnCompleted(
237 bool success) { 237 bool success) {
238 results_ = feedback_private::SendFeedback::Results::Create( 238 results_ = feedback_private::SendFeedback::Results::Create(
239 success ? feedback_private::STATUS_SUCCESS : 239 success ? feedback_private::STATUS_SUCCESS :
240 feedback_private::STATUS_DELAYED); 240 feedback_private::STATUS_DELAYED);
241 SendResponse(true); 241 SendResponse(true);
242 } 242 }
243 243
244 } // namespace extensions 244 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698