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

Side by Side Diff: chrome/browser/chromeos/gview_request_interceptor.cc

Issue 341044: Move chromeos code to namespace chromeos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/chromeos/gview_request_interceptor.h" 5 #include "chrome/browser/chromeos/gview_request_interceptor.h"
6 6
7 #include "net/base/escape.h" 7 #include "net/base/escape.h"
8 #include "net/base/load_flags.h" 8 #include "net/base/load_flags.h"
9 #include "net/url_request/url_request_job.h" 9 #include "net/url_request/url_request_job.h"
10 #include "net/url_request/url_request.h" 10 #include "net/url_request/url_request.h"
11 #include "net/url_request/url_request_redirect_job.h" 11 #include "net/url_request/url_request_redirect_job.h"
12 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
13 13
14 namespace chromeos {
15
14 // This is the list of mime types currently supported by the Google 16 // This is the list of mime types currently supported by the Google
15 // Document Viewer. 17 // Document Viewer.
16 static const char* const supported_mime_type_list[] = { 18 static const char* const supported_mime_type_list[] = {
17 "application/pdf", 19 "application/pdf",
18 "application/vnd.ms-powerpoint" 20 "application/vnd.ms-powerpoint"
19 }; 21 };
20 22
21 static const char* const kGViewUrlPrefix = "http://docs.google.com/gview?url="; 23 static const char* const kGViewUrlPrefix = "http://docs.google.com/gview?url=";
22 24
23 GViewRequestInterceptor::GViewRequestInterceptor() { 25 GViewRequestInterceptor::GViewRequestInterceptor() {
(...skipping 30 matching lines...) Expand all
54 url += EscapePath(request->url().spec()); 56 url += EscapePath(request->url().spec());
55 return new URLRequestRedirectJob(request, GURL(url)); 57 return new URLRequestRedirectJob(request, GURL(url));
56 } 58 }
57 return NULL; 59 return NULL;
58 } 60 }
59 61
60 URLRequest::Interceptor* GViewRequestInterceptor::GetGViewRequestInterceptor() { 62 URLRequest::Interceptor* GViewRequestInterceptor::GetGViewRequestInterceptor() {
61 return Singleton<GViewRequestInterceptor>::get(); 63 return Singleton<GViewRequestInterceptor>::get();
62 } 64 }
63 65
66 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698